ID:               44766
 Comment by:       felix9x at yahoo dot com
 Reported By:      cap at unagon dot com
 Status:           No Feedback
 Bug Type:         MySQLi related
 Operating System: Redhat 3 Enterprise
 PHP Version:      5.2.5
 Assigned To:      uw
 New Comment:

Probably same as Bug# 46144.


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

[2008-07-22 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2008-07-14 16:50:43] [email protected]

Can't repeat. You are not giving a repeatable code example. Please
provide an example that uses nothing but ext/mysqli API calls, for
example:

        $mysqli = mysqli_init();
        $mysqli->real_connect($host, $user, $passwd, $db, $port, $socket);
        $mysqli->query('DROP TABLE IF EXISTS test');
        $mysqli->query('CREATE TABLE test(id INT, label CHAR(2))');
        $stmt = $mysqli->prepare('INSERT INTO test(id, label) VALUES (?, ?,
bogus)');
        var_dump($stmt);
        var_dump($mysqli->errno);
        var_dump($mysqli->error);
        $mysqli->close();


The above code works fine. It returns something like this:

bool(false)
int(1136)
string(47) "Column count doesn't match value count at row 1"

Also, please add the MySQL version to the bug report. Thanks!

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

[2008-04-17 19:40:56] cap at unagon dot com

Description:
------------
if there is an obvious error in a prepare statement, the error is
recognized correctly but mysqli_error is the empty string

Reproduce code:
---------------
     $stmt=DB::$mysqli->prepare ('INSERT INTO TYPES (TYPENAME,TYPESPEC)
VALUES (?,?,ppp)');
      if (!$stmt) {throw new Exception ("Error: Prepare failed in
registerType: ".(DB::$mysqli->error));}   

Expected result:
----------------
Expecting an exception to be thrwon with a text containing some
meaningful error description

Actual result:
--------------
Exception is thrown, but error is empty and errno is 0.


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


-- 
Edit this bug report at http://bugs.php.net/?id=44766&edit=1

Reply via email to