I\'m doing an INSERT ... ON DUPLICATE KEY UPDATE for a PRIMARY KEY in the following table:
INSERT ... ON DUPLICATE KEY UPDATE
PRIMARY KEY
DESCRIBE users_interests;
So you know whether you updated a row (duplicate key) or just inserted one: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html