How do I get the ID of the last updated row in MySQL using PHP?
My solution is , first decide the "id" ( @uids ) with select command and after update this id with @uids .
SET @uids := (SELECT id FROM table WHERE some = 0 LIMIT 1); UPDATE table SET col = 1 WHERE id = @uids;SELECT @uids;
it worked on my project.