php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3976 mysql_query produces warnings
Submitted: 2000-03-30 04:34 UTC Modified: 2000-07-29 16:30 UTC
From: hs at caldera dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Release Candidate 1 OS: Linux (Caldera OpenLinux2.4)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hs at caldera dot de
New email:
PHP Version: OS:

 

 [2000-03-30 04:34 UTC] hs at caldera dot de
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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-09 18:31 UTC] zeev at cvs dot php dot net
I'm unable to reproduce this problem in 4.0.0 release, but I don't think anything changed in this area since 4.0RC1.  It works fine for me.

Are you using mod_auth_mysql, or PHP 3.0 as well in your Web server?  If you are, note that you must use --with-mysql=/path/to/mysql when running PHP 4.0's configure, and must not rely on the built-in MySQL support that it has.
 [2000-07-29 16:30 UTC] stas@php.net
old release, no feedback - closing
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 03 07:01:33 2024 UTC