note 116920 added to pdostatement.rowcount
| From: | info at buylikesandviews dot com | Date: | Sat, 21 Mar 2015 09:04:15 +0000 |
| Subject: | note 116920 added to pdostatement.rowcount | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202001@lists.php.net to get a copy of this message | ||
every good work
If you use "INSERT INTO ... ON DUPLICATE KEY UPDATE" syntax, mysql_affected_rows() will
return you 2 if the UPDATE was made (just as it does with the "REPLACE INTO" syntax) and 1
if the INSERT was.
So if you use one SQL request to insert several rows at a time, and some are inserted, some are just
updated, you won't get the real count.
----
Server IP: 72.52.91.14
Probable Submitter: 103.255.232.84
----
Manual Page -- http://php.net/manual/en/pdostatement.rowcount.php
Edit -- https://master.php.net/note/edit/116920
Del: integrated -- https://master.php.net/note/delete/116920/integrated
Del: useless -- https://master.php.net/note/delete/116920/useless
Del: bad code -- https://master.php.net/note/delete/116920/bad+code
Del: spam -- https://master.php.net/note/delete/116920/spam
Del: non-english -- https://master.php.net/note/delete/116920/non-english
Del: in docs -- https://master.php.net/note/delete/116920/in+docs
Del: other reasons-- https://master.php.net/note/delete/116920
Reject -- https://master.php.net/note/reject/116920
Search -- https://master.php.net/manage/user-notes.php