MySQL: ON DUPLICATE KEY UPDATE

Now that’s something I did not know: one can perform an insert, but if you specify ON DUPLICATE KEY UPDATE (available since MySQL 4.1.0) in your query, the row will get updated … now that basically combines two queries in one (a SELECT and then an INSERT or UPDATE depending on the number of rows …