I am currently using this type of SQL on MySQL to insert multiple rows of values in one single query:
INSERT INTO `tbl` (`key1`,`key2`) VALUES (\'r1v1\',\'r1
Here is my solution: https://github.com/sasha-ch/Aura.Sql based on auraphp/Aura.Sql library.
Usage example:
$q = "insert into t2(id,name) values (?,?), ... on duplicate key update name=name"; $bind_values = [ [[1,'str1'],[2,'str2']] ]; $pdo->perform($q, $bind_values);
Bugreports are welcome.