Let's make this simple: I have a table called chat that has many rows in, every user can add a new message and this means the table can get quite large.
(I have looked online and it's not very 'clear' on some examples.)
I need to delete all older messages, keeping only say 25 of the newest ones. Now I wish to do it via id, as my id is set to auto-increment.
This is what I have but it doesn't work:
DELETE FROM `chat` ORDER BY `id` DESC LIMIT 0,50
I found it and changed it, but no luck!
I just not sure what to try. I am not very experienced, I know the basics, any help is very appreciated.