FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Will this work?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Will this work? [message #172244] Mon, 07 February 2011 23:03 Go to previous message
Derek Turner is currently offline  Derek Turner
Messages: 48
Registered: October 2010
Karma:
Member
How long and complicated can a while condition be?

I want to:

define a string variable ($i) starting at "01"
use this in a mysql query
increment the string
dropout of the while when a zero result comes back from mysql

So, would something like:

while ($sql="some multi-lined mysql query containing $i twice" &&
$result=mysql($conn, $sql)){

do some stuff including incrementing $i;

}

presumably the first condition will always return true, will the second
return false if no matches are found? Can a while condition run over
several lines like this? The manual doesn't seem to say.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question about binary transfers in POST requests
Next Topic: file_put_contents not creating file
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 10:48:32 GMT 2024

Total time taken to generate the page: 0.04131 seconds