ID: 46144 Comment by: Progman2002 at gmx dot de Reported By: Progman2002 at gmx dot de Status: Feedback Bug Type: MySQLi related Operating System: Linux PHP Version: 5.2.6 New Comment:
It doesn't work as expected, still showing "-0-" in the error message instead of the actually error message like "... syntax error near WHERE ..." configure line was: ./configure --prefix=/home/progman/phptest/ --disable-all --with-mysqli Output was: PHP-Version: 5.2.7RC4-dev MySQL-Server-Version: 50042 MySQL-Protocol: 10 -0- Execution was: $ ~/phptest/bin/php ~/nopaste_51976.php Previous Comments: ------------------------------------------------------------------------ [2008-11-10 13:42:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-09-21 13:49:28] Progman2002 at gmx dot de Description: ------------ If you create a prepared statement with a DELETE query and tries to create a second prepared statement with an INSERT query on the same table without closing the first one the MySQLi::prepare() method failed, but the fields $error and $errno (and all other related to them) aren't filled with the error message. This is strange as the prepare() failed but you dont know why. The mysql error is shown if I save the second statement into another variable (like if (!$stmt2 = $db->prepare($sql))) (maybe its related to bug #44766) Reproduce code: --------------- Code is at http://nopaste.php-quake.net/51976 Expected result: ---------------- PHP-Version: 5.2.6-pl7-gentoo MySQL-Server-Version: 50042 MySQL-Protocol: 10 {Showing a MySQL error which says "Syntax error near WHERE (?,?)" or says sth. like "unfinished prepare statement before") Actual result: -------------- PHP-Version: 5.2.6-pl7-gentoo MySQL-Server-Version: 50042 MySQL-Protocol: 10 -0- (so the values are all empty strings or zero) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46144&edit=1