note 111126 added to mysqli.multi-query
| From: | miqrogroove at gmail dot com | Date: | Thu, 17 Jan 2013 21:40:21 +0000 |
| Subject: | note 111126 added to mysqli.multi-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193184@lists.php.net to get a copy of this message | ||
Here are more details about error checking and return values from multi_query(). Testing shows that
there are some mysqli properties to check for each result:
affected_rows
errno
error
insert_id
warning_count
As noted in an earlier comment, if error or errno are not empty then the remaining queries did not
return anything, even though error and errno will appear to be empty if processing further results
is continued.
Also note that get_warnings() will not work with multi_query(). It can only be used after looping
through all results, and it will only get the warnings for the last one of the queries and not for
any others. If you need to see or log query warning strings then you must not use multi_query(),
because you can only see the warning_count value.
----
Server IP: 192.41.42.26
Probable Submitter: 164.76.175.131
----
Manual Page -- http://php.net/manual/en/mysqli.multi-query.php
Edit -- https://master.php.net/note/edit/111126
Del: integrated -- https://master.php.net/note/delete/111126/integrated
Del: useless -- https://master.php.net/note/delete/111126/useless
Del: bad code -- https://master.php.net/note/delete/111126/bad+code
Del: spam -- https://master.php.net/note/delete/111126/spam
Del: non-english -- https://master.php.net/note/delete/111126/non-english
Del: in docs -- https://master.php.net/note/delete/111126/in+docs
Del: other reasons-- https://master.php.net/note/delete/111126
Reject -- https://master.php.net/note/reject/111126
Search -- https://master.php.net/manage/user-notes.php