I am inserting some data into a table, but it occasionally clashes with other data in the table (ie. it has the same primary key). I would like to be able to just over
MySQL has a "INSERT ... ON DUPLICATE KEY UPDATE" command. You can find it here: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
INSERT INTO `table` VALUES ('a', 'b') ON DUPLICATE KEY UPDATE `field1`='a', `field2`='b'