I have a query where I INSERT on unique but UPDATE on duplicate.
Now I'd like to count the times a row get changed/updated. Is this possible to do in the same query?
$query = "INSERT INTO table(
column1,
column2)
VALUES(
value1,
value2)
ON DUPLICATE KEY UPDATE
column1 = VALUES(column1),
column2 = VALUES(column2),
column3 = column3+1"; //SOMETHING LIKE THIS?
UPDATE Actually this seems to work as is!