PHP 4.0 Bug #3976: mysql_query produces warnings

From: Date: Thu, 30 Mar 2000 09:34:09 +0000
Subject: PHP 4.0 Bug #3976: mysql_query produces warnings
Groups: php.dev 
Request: Send a blank email to php-dev+get-17400@lists.php.net to get a copy of this message
From: hs@caldera.de Operating system: Linux (Caldera OpenLinux2.4) PHP version: 4.0 Release Candidate 1 PHP Bug Type: MySQL related Bug description: mysql_query produces warnings The following works without warnings under PHP Version 3.0.15 but produces the following warning in PHP Version 4.0RC1: Warning: MySQL: Unable to save result set in /home/httpd/html/localweb/web/test/phpbug.php on line 12 Database is however created correctly. In 3.0.15 $result is 1 (TRUE) in 4.0RC1 it seams to be undefined. -------8<------------------------------------------- <html> <body> <? $db = mysql_connect("localhost", "root"); mysql_select_db("test",$db); $querystring = "CREATE TABLE foo ("; $querystring .= "ID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY"; $querystring .= ", "; $querystring .= "Name VARCHAR(255)"; $querystring .= ")"; $result = mysql_query($querystring, $db); if (!$result) { echo "\n<BR>\n<B>Error:</B> ". mysql_error(). "<BR>\n"; } ?> </body> </html>

« previous php.dev (#17400) next »