Native upsert for database

5 years ago

Buri
Member | 15
+
0
-

Hey,
it would be nice functionality to have native functionality in database for ON DUPLICATE KEY clause:

INSERT INTO tbl VALUES(array1) ON DUPLICATE KEY UPDATE array2

with notation like

$db->table('tbl')->upsert(array1,array2);

5 years ago

looky
Member | 100
+
0
-

ON DUPLICATE KEY UPDATE is MySQL specific..