PHP 4.0 Bug #4515: not a valid MySQL-Link resource
| From: | peterk at wfw dot wtb dot tue dot nl | Date: | Fri, 19 May 2000 08:24:38 +0000 |
| Subject: | PHP 4.0 Bug #4515: not a valid MySQL-Link resource | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18942@lists.php.net to get a copy of this message | ||
From: peterk@wfw.wtb.tue.nl
Operating system: Slackware Linux kernels 2.0.35 and 2.2.13
PHP version: 4.0 Release Candidate 2
PHP Bug Type: MySQL related
Bug description: not a valid MySQL-Link resource
The following code (stripped down)
$sh = mysql_connect("host","user","password");
$dbc = mysql_select_db("database",$sh);
$query = "SELECT * FROM table WHERE row=" . $someid;
$result = mysql_query($query,$dbc);
gives the folowing warning:
Warning: Supplied argument is not a valid MySQL-Link resource in
/usr/local/apache/htdocs/mate/try.php on line 13
line 13 is the `$result =...' line.
Omitting the link_identifier solves the problem. The example worked with php3.0.12.
php4 RC2 was compiled with:
'./configure' '--with-mysql=/usr/local/mysql' '--with-xml'
'--with-apache=../apache_1.3.12' '--enable-track-vars'
MySQL is version 3.22.26a