PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

Issue with `insertMulti` and `setQueryOption("IGNORE")`

Open ClemRz opened this issue 5 years ago • 0 comments

Assuming we try to do an insertMulti with one row of data which happens to be a duplicate of one in the DB.

echo("---" . PHP_EOL);
echo($mysqliDb->setQueryOption("IGNORE")->insertMulti($table, $data) . PHP_EOL);
echo("---" . PHP_EOL);

This returns:

---

---

Which happens to be falsy thus interpreted as an error during the insert attempt.

ClemRz avatar Jul 21 '20 14:07 ClemRz