The table is some like that:
- id -- title -- article -- date -
- -
- - - - - - - - - - - - - - - - -
What I want to do is SELECT the most recent entry (not sure if Date field is necessary for that) and also the one before it.
So if I have this:
- id -- title -- article -- date -
1 -- News1 -- Article1 -- 1/1/1
2 -- News2 -- Article2 -- 2/1/1
3 -- News3 -- Article3 -- 3/1/1
4 -- News4 -- Article4 -- 4/1/1
- - - - - - - - - - - - - - - - - -
What I want is:
- On day 1/1/1 the code gives the News 1
- On day 2/1/1 the same code gives the News 2 and 1
- On day 3/1/1 the " " " " News 3 and 2
- On day 4/1/1 the " " " " News 4 and 3
Is it possible? How?
SELECT * from news WHERE ???
Please help me thanks.
==================
SOLVED
I've found the answer, it is posted below.
===================