Misc PHP questions...

From: Date: Tue, 14 Mar 2000 19:21:40 +0000
Subject: Misc PHP questions...
Groups: php.version4 
Request: Send a blank email to php-version4+get-12101@lists.php.net to get a copy of this message
Hello All, I'm in the process of converting a bunch of sites from Cold Fusion to PHP and have a few questions. Granted, these aren't PHP4 specific, but hopefully ya'll don't mind. 1) How do I read in an MS SQL Text column? I've tried playing around with the odbc binary API a bit but haven't been successful. 2) Cold Fusion has a nifty language construct that allows you to embed an output variable in the CF code. So you might have something like this: <CFOUTPUT> <A HREF="http://www.somesite.com/article.cfm?id=#ArticleID#"></A> </CFOUTPUT> Where ArticleID is the CF variable. Is there something equivalent in PHP? The closest I've come up with is either to echo a concatenated string or to echo the results of sprintf. So I might have something like this: echo sprintf("<A HREF=\"http://www.somesite.com/article.cfm?id=%d\"></A>", $ArticleID); or echo "<A HREF=\"http://www.somesite.com/article.cfm?id=", $ArticleID, "\"></A>"; 3) Cold Fusion has another nifty query construct that allows you to group results. So, if I have a query that consists of different article types (ie: Documentation, FAQ, Presentation) and each type can have articles with different categories (ie: Programming, Handheld API, Desktop API, etc), I might have some CF code that looks like this: <CFOUTPUT QUERY="MyQuery" GROUP="TYPE"> <H3>#TYPE#</H3> <CFOUTPUT QUERY="MyQuery"> // output each article title here </CFOUTPUT> </CFOUTPUT> This would theoretically spit out a page with groups of article listings. The first CFOUTPUT tag groups everything by the type column in the query, the second CFOUTPUT tag outputs everything for a specific group (in this case, a specific article type). Does something similar exist in PHP? Thanks a bunch! -- Ryan Robertson Palm Development Support

« previous php.version4 (#12101) next »