-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* On 11-01-02 at 23:08
* Erik Price said....
> I am curious if using the same mysql_query() function twice causes some
> kind of problem.
>
> It seems that if I use
>
> $result = mysql_query($sql, $db);
> if (mysql_fetch_array($result)) {
> while ($row = mysql_fetch_array($result) or die("You lose. No data
> fetched.")) {
> // print some data
> // print a simple sentence to see if the WHILE statement even
> executes
> }
> } else {
> // print "No results match your criteria"
> }
>
>
> IF statement is true but the WHILE statement doesn't seem to produce its
> intended effect. In other words, I get the die() message "You lose. No
> data fetched."
I'll most likely be corrected (I just joined the list to brush up on my
php) but I think that if you change this
> while ($row = mysql_fetch_array($result) or die("You lose. No data
to this
> while ($row = mysql_fetch_array($another_result) or die("You lose. No data
You'll be on the right track.
> This leads me to believe that I can't run two instances of mysql_query()
> or perhaps mysql_fetch_array().
No, of course you can.
HTH
- --
Nick Wilson
Tel: +45 3325 0688
Fax: +45 3325 0677
Web: www.explodingnet.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8P2XjHpvrrTa6L5oRArToAJ96owiXpTmPnOGSOI2jzvMHnAwm1ACbBXk2
DbgVDF6NwxSwOA8+p86zNC0=
=0Z6i
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]