Hi all, weird one here.
I have a basic Server Action that takes an array, repeats through it and if a delete “flag” has been set, should delete that record:
The server action works fine updating and adding new records but when one record is to be deleted it often deletes more than one record (normally two and I can’t see a pattern to how it picks the second record)
This is the array sent from my page action where only record with id:3 is flagged to delete (from the 4 entries):
And this is the return from the Server Action showing id:3 was deleted and the other 3 were updated:
And here is the very simple delete query:
BUT, both id:3 and id:2 were deleted from my table.
I have tried with the condition delete_contact==1 and delete_contact!=1 just in case blanks were causing confusion but the same thing happens.
It is probably an obvious mistake but does anyone have any pointers on what I should be looking for?
Paul.