Good day everyone! I have MySQL Database with tables on
CREATE TABLE `TableWithInnoDBEngine` (
`userID` int(11) NOT NULL, PRIMARY KEY (`userID`),
UNIQUE KEY `userID_UNIQUE` (`userID`) )
ENGINE=InnoDB DEFAULT CHARSET=utf8;
mysql> select * from TableWithInnoDBEngine;
+--------+
| userID |
+--------+
| 1 |
| 2 |
| 3 |
+--------+
I'm doing :
INSERT IGNORE INTO TableWithInnoDBEngine (UserID) VALUES (1),(2),(3),(4),(5);
2 row(s) affected Records: 5 Duplicates: 3 Warnings: 0
And want to get all affected rows?
SELECT LAST_INSERT_ID() returns only last value (5), but need to return
+--------+
| userID |
+--------+
| 4 |
| 5 |
+--------+
I'm using PHP 5.6.17 + MySQL 5.5.46-0+deb7u1
Thank you for your responses!