Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11163
| Path | csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Derek Turner <frderek@cesmail.net> |
| Newsgroups | comp.lang.php |
| Subject | Will this work? |
| Date | 7 Feb 2011 23:03:15 GMT |
| Lines | 21 |
| Message-ID | <8rbc1jFh6iU2@mid.individual.net> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net SRr07Neh1Cu4KDuXstrUBg8eIIaT0QjXyJMypYqkMchghCHxU0 |
| Cancel-Lock | sha1:VQ5U1WScFOBSV6PagcR34RR8/QI= |
| User-Agent | Pan/0.133 (House of Butterflies) |
| Xref | csiph.com comp.lang.php:11163 |
Show key headers only | View raw
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.
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
Will this work? Derek Turner <frderek@cesmail.net> - 2011-02-07 23:03 +0000
Re: Will this work? Denis McMahon <denis.m.f.mcmahon@googlemail.com> - 2011-02-08 01:27 +0000
Re: Will this work? Derek Turner <frderek@cesmail.net> - 2011-02-08 13:06 +0000
Re: Will this work? Jerry Stuckle <jstucklex@attglobal.net> - 2011-02-08 08:36 -0500
csiph-web