Answer the question
In order to leave comments, you need to log in
How to delete the last user entry?
The task - to delete the last record of the user from the table.
I try like this
DELETE FROM `all` WHERE id = (SELECT id FROM `all` where userid='5' ORDER BY id DESC LIMIT 1)
SELECT id FROM `all` where userid='5' ORDER BY id DESC LIMIT 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question