Re: PHP4 and mysql_fetch_array() - one more try
| From: | JD Daniels | Date: | Wed, 01 Nov 2000 16:58:09 +0000 |
| Subject: | Re: PHP4 and mysql_fetch_array() - one more try | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4095@lists.php.net to get a copy of this message | ||
Strange, I get the exact same result with Apache 1.3.12 , SCO 3.2 v5.0.5,
MySQL 3.23, and PHP 4. But I downloaded Agriasofts package for my win 2000
machine ( to develop on), and it works no problem. As far as I can tell, I
have PHP and MySQL configured exactly the same on both machines. Very
confusing.
I found this on the PHP FAQ:
http://www.php.net/FAQ.php#7.12
I have yet to make this answer work for me.. Maybe you will have more luck
:)
JD
----- Original Message -----
From: "Robert Vetter" <vetter@rundschau-onlinedienst.de>
To: <php-db@lists.php.net>
Sent: Wednesday, November 01, 2000 12:35 AM
Subject: [PHP-DB] PHP4 and mysql_fetch_array() - one more try
> Hello,
>
> I have posted once regarding following problem, but didn't get answer.
> Perhaps this time?
>
> When I have PHP code like this:
>
> $rs_result=mysql_db_query($db,"SELECT * FROM XX WHERE
> something=$yy",$connection);
> while($row_result=mysql_fetch_array($rs_result))
> {
> do_something();
> }
>
> I always get a warning from PHP4, which says:"Supplied argument is not a
> valid MySQL result resource in above_script.php on line 3" - this is the
> line with mysql_fetch_array() function call.This happens _only_ when the
> query in the first line returns _no_ rows. Funny thing is that this
> worked with PHP3
> without any problems. Is this a bug or have there been modifications in
> behavior of those mysql functions in PHP4?
>
> Thanks
>
> Robert Vetter
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>