Native upsert for database

Notice: This thread is very old.
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);
looky
Member | 99
+
0
-

ON DUPLICATE KEY UPDATE is MySQL specific..