Re: [PHP4BETA] Misc PHP questions...
| From: | Unknown Sender | Date: | Tue, 14 Mar 2000 19:22:47 +0000 |
| Subject: | Re: [PHP4BETA] Misc PHP questions... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12103@lists.php.net to get a copy of this message | ||
Ryan:
1) No clue
2) You don't need to split the line, you can include the variable inside
the echo statement like so:
echo "<A HREF=\"http://www.somesite.com/article.cfm?id=<$ArticleID>\"></A>";
3) There is not a similar construct that I know of but the logic is pretty
simple to recreated. Just order primarily by that column in your sql and
then set a variable each time through the loop. check its new value
against its old value each timme, and if they differ, print your headers.
Sean Bright
-----------
me@seanbright.com
On Tue, 14 Mar 2000, Ryan Robertson wrote:
> 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
>
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>