Re: INSERT... ON DUPLICATE KEY UPDATE
Does this work for you?
INSERT INTO import_io_mysql (tournament, year, name, thru, total) VALUES ('RBC Heritage','2015', 'Jordan Spieth', '56', '-12') ON DUPLICATE KEY UPDATE (tournament='RBC Heritage', year='2015', thru='56', total='-12');
You can't update the field that caused the UNIQUE KEY violation, but all the others are fair game.
BTW, what happens if there is a second Jordan Spieth enters your competition?
In the real world, a name tends not to be a unique identifier. The company I work for has about 20,000 employees, and at times there has been 3 of us with the same name. They use a unique employee id to identify us. The employee id is good for life because some employees leave, and come back. They get back their same employee id.
Good luck,
Barry.