Bug #10389: mysql_query(); returns an invalid result resource
| From: | pmarks at employees dot org | Date: | Wed, 18 Apr 2001 23:45:58 +0000 |
| Subject: | Bug #10389: mysql_query(); returns an invalid result resource | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51903@lists.php.net to get a copy of this message | ||
From: pmarks@employees.org
Operating system: Linux
PHP version: 4.0.4pl1
PHP Bug Type: MySQL related
Bug description: mysql_query(); returns an invalid result resource
Here is the code I am using that produces the error:
<?php
$db = mysql_connect("localhost");
mysql_select_db("ue", $db);
$result = mysql_query("SELECT * FROM jobsc");
$rows = mysql_num_rows($result);
?>
on the last line is where the error is generated. In
any browser, I see:
Warning: Supplied argument is not a valid MySQL result
resource ...
My setup contains apache 1.3.19 with the static PHP 4.0.4pl1
module compiled in. My configure lines for PHP are:
./configure --with-apache=/home/apache_1.3.19
--with-mysql=/usr/local/mysql
/usr/local/mysql is the install directory for mysql
That is all the information I believe I have, and I'm
relatively sure that PHP is not crashing, per say.
--
Edit Bug report at: http://bugs.php.net/?id=10389&edit=1