I hate writing loops, and I've been trying to work this one out for a while now. I know it's piss simple to write, and I should be able to do it, but brain often shuts down while writing loops, so I'm calling on you good people for help!
Bascially, I've an SQL table, each row having a unique "id" field, a simple integer. The first row in the table is 1, and when each new row is added, that number gets incremented. That's all fine and working.
What I want to produce is a simple php script that will write the latest five rows in the table to the screen, and then produce the rest of the rows on another page - a sort of archive.
How would you go about producing:
1) the loop to print JUST the first five
and
2) the loop to write all the rows after the first five.
Many thanks,
Ed Ludlow