I have a table with four columns, (id, searchstring, count, timestamp).
I want to be able to make to use of the ON DUPLICATE KEY UPDATE feature to update the count of searchstring when a duplicate is entered.
However, searchstring needs to be the primary key to be able to do this, and my id is automatically set to my primary key because it is auto incrementing.
Is there any way around this?
Yes, set the primary key to include both id and searchstring
You can change the existing table using: