[PHP-DEV] Bug #11765 Updated: Warning: MySQL: Unable to save result set in From: sniper <email protected>
Date: 06/28/01

ID: 11765
Updated by: sniper
Reported By: root <email protected>
Old-Status: Open
Status: Feedback
Old-Bug Type: MSSQL related
Bug Type: MySQL related
Operating system:
PHP Version: 4.0.6
Assigned To:
Comments:

Try adding this lines after each mysql function:

echo mysql_errno().": ".mysql_error()."<BR>";

This way you should get the reason why it doesn't work.

And FYI: Use mysql_query() / mysql_select_db()
instead of mysql_db_query().

--Jani

Previous Comments:
---------------------------------------------------------------------------

[2001-06-27 23:37:47] root <email protected>
The script(error.php) is :

<?
$db_acc_user = "root";
$db_acc_passwd = "password";
$db = "pacc";
$sql = "INSERT INTO type (name, quota, pc, cn, office) VALUES ('Howard', '10', '1', '0', '1')";
mysql_connect("localhost",$db_pacc_user,$db_pacc_passwd);
mysql_db_query($db,$sql);
mysql_close();
?>

The result in browser is:

Warning: MySQL: Unable to save result set in /home/0/admin/error.php on line 7

But I just found that NO error in command line

root <email protected> # php ./error.php
X-Powered-By: PHP/4.0.6
Content-type: text/html

---------------------------------------------------------------------------

[2001-06-27 23:06:49] root <email protected>
I'm getting the following error message when I execute a query (such as insert or delete
or update but not select) that doesn't produce any results:

Warning: MySQL: Unable to save result set in /path/to/sql.php3
on line 33

MySQL said NOTHING and the query was successful executed.

I have set "display_errors = Off" in my php.ini, so no warnings should be shown
, but php script can not go on at the line where the Warnning should display.

I configured php with the following command:

./configure --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=../../gd/gd1.3
--with-ftp --with-imap=../../mail/imap/imap-4.7c --enable-memory-limit
--with-pgsql=/usr/local/pgsql

MySQL is version 3.23.38 and PostgreSQL is version 7.1.2

and compiled with th following command:

./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gb2312
--with-extra-charsets=all

./configure --enable-multibyte --enable-unicode-conversion --with-perl
--with-openssl=/usr/local/ssl --enable-odbc --with-CXX

BTW : The script is perfect on mysql-php-4.0.3pl1 and postgreSQL-php-4.0.6 .

---------------------------------------------------------------------------

[2001-06-27 23:06:01] sniper <email protected>
Please include a shortest possible example script that
can be used to reproduce this problem.

---------------------------------------------------------------------------

[2001-06-27 22:58:58] root <email protected>
I'm getting the following error message when I execute a query (such as insert or delete or update but not select) that doesn't produce any results:

Warning: MySQL: Unable to save result set in /path/to/sql.php3
on line 33

MySQL said NOTHING and the query was successful executed.

I have set "display_errors = Off" in my php.ini, so no warnings should be shown , but php script can not go on at the line where the Warnning should display.

I configured php with the following command:

./configure --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=../../gd/gd1.3 --with-ftp --with-imap=../../mail/imap/imap-4.7c --enable-memory-limit --with-pgsql=/usr/local/pgsql

MySQL is version 3.23.38 and PostgreSQL is version 7.1.2

and compiled with th following command:

./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gb2312 --with-extra-charsets=all

./configure --enable-multibyte --enable-unicode-conversion --with-perl --with-openssl=/usr/local/ssl --enable-odbc --with-CXX

---------------------------------------------------------------------------

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11765&edit=2

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>