Mysql Math question
Posted: Wed Apr 27, 2005 8:39 pm
I am trying to do something. I don't even know if it will work.
Will this work? Or do I need to do it someother way?
I am trying to only show the last 7 entries in the Logs table.
I know its stupid, and there has to be an easier way to do this,
but I am very tired and not thinking quite straight.
Thanks
Will this work? Or do I need to do it someother way?
Code: Select all
SELECT * FROM Logs WHERE id > MAX(id)-7 ORDER BY date_enteredI know its stupid, and there has to be an easier way to do this,
but I am very tired and not thinking quite straight.
Thanks