The operation was completed with a warning. Duplicate entry 'xxxx' for key 'PRIMARY'

Hi. I am attempting to update a field in mysql as a result of an update in google sheets. gSheets works fine, I can also search for the post in mysql, but when I try to update, I get this error: The operation was completed with a warning. Duplicate entry ‘4136’ for key ‘PRIMARY’

I’m confused because if I am just updating, why would i get a Duplicate entry error? I could understand if I was adding a new entry and tried to use the same post id.

Here is a screenshot showing that I can find a record using SEARCH in mysql:

Here is my UPDATE record, where I mapped all of the fields:

The result is the duplicate primary key error, and the field I want to update doesn’t get updated.

Appreciate the help in advance!

disregard. Leave post id blank, filter based upon previously obtained post id. works fine :slight_smile:

2 Likes

Hey there @Sheldon_Bernstein :wave:

Great to hear that you successfully defeated your issue and that everything works! Thank you very much for keeping us updated and sharing the solution.

Keep up the good work! :sunny: