Forum Moderators: open

Message Too Old, No Replies

Beginner Q

Reading DB records

         

wkpride

3:03 am on Nov 25, 2007 (gmt 0)

10+ Year Member



Hey!

making progress on input, storing and recalling data.

I'm not sure how to force records to read in reverse...
Right now I'm getting data and when I print it out, I get record #1, Record #2,Record #3....
I would like to have the last record first (#9, #8, #7....until the very first)

Suggestions?

KP

Thanks!

php4U

4:25 am on Nov 25, 2007 (gmt 0)

10+ Year Member



You can use something like "ORDER BY id DESC" in your SQL statement.

SELECT * FROM table ORDER BY id DESC

Hopefully this will help.

wkpride

1:54 pm on Nov 25, 2007 (gmt 0)

10+ Year Member



Thanks!

I'll give it a try.

KP