note 64770 added to function.mysqli-error
| From: | dot) | Date: | Thu, 20 Apr 2006 12:22:59 +0000 |
| Subject: | note 64770 added to function.mysqli-error | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108806@lists.php.net to get a copy of this message | ||
The decription "mysqli_error -- Returns a string description of the LAST error" is not
exactly that what you get from mysqli_error. You get the error description from the last
mysqli-function, not from the last mysql-error.
If you have the following situation
if (!$mysqli->query("SET a=1")) {
$mysqli->query("ROLLBACK;")
printf("Errormessage: %s\n", $mysqli->error);
}
you don't get an error-message, if the ROLLBACK-Query didn't failed, too. In order to get
the right error-message you have to write:
if (!$mysqli->query("SET a=1")) {
printf("Errormessage: %s\n", $mysqli->error);
$mysqli->query("ROLLBACK;")
}
----
Server IP: 212.124.37.9
Probable Submitter: 195.227.123.98
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-error.php
Edit -- http://master.php.net/note/edit/64770
Del: integrated -- http://master.php.net/note/delete/64770/integrated
Del: useless -- http://master.php.net/note/delete/64770/useless
Del: bad code -- http://master.php.net/note/delete/64770/bad+code
Del: spam -- http://master.php.net/note/delete/64770/spam
Del: non-english -- http://master.php.net/note/delete/64770/non-english
Del: in docs -- http://master.php.net/note/delete/64770/in+docs
Del: other reasons-- http://master.php.net/note/delete/64770
Reject -- http://master.php.net/note/reject/64770
Search -- http://master.php.net/manage/user-notes.php