Log in

View Full Version : Mysql problem



fobos
09-28-2009, 04:47 PM
Hello All,
i am having a HUGE mental block right now. ok here it is.
i have a database where everthing in it gets displayed.
|id|product_name|filename|
1 crap something.ppt

2. everyday, (1) new product will be added to the database. now i want to display all rows, minus the latest one, because that will be listed above. So here is an example. Say today is the 25th
[this is one database]

Todays current news
Link... <-- 25th statement used (SELECT * FROM db ORDER BY id LIMIT 1)

Archived News statement used
(SELECT * FROM db ORDER BY id "SOMETHING FOR MINUS 1")
________________________
crap download <-- 24th
crap download <-- 23th

and so forth...

is there a statement to display all minus the lates entry..
if this is confusing, please let me know..

james438
11-04-2009, 09:23 PM
If it were me I would add a datetime column for the entries.

Select * from tablename order by ID desc limit 1,99999999
the above sounds like what you are looking for.