I had the exact same problem....
What I had wrong in my code was the when I was updating I was getting the "employeeid" but not the ID of the actual row.



$query = "update
...