INSERT INTO thetable (pageid, name, somefield)
VALUES (1, "foo", "first")
ON DUPLICATE KEY UPDATE (somefield = 'first')
taken from
Being a complete non programmer, i thought it would be a good idea to help others like me who have no programming knowledge but want to develop web based applications. Additionally i wanted to be able to access all these for my own repetitive use.
INSERT INTO thetable (pageid, name, somefield)
VALUES (1, "foo", "first")
ON DUPLICATE KEY UPDATE (somefield = 'first')
taken from