Results 1 to 24 of 24
Thread: Next Record by Order
Nov 7, 2012, 07:25 #1
- Join Date
- Apr 2006
- 2 Post(s)
- 0 Thread(s)
Next Record by Order
I've been trying to figure out a way to get the next record by order.
Say I have 10 records and an 'order' column/field in the table being 1, 2, 3, 4.....9, 10.
So I start at record with 'order' 1 and I need to select the next, it will be 2, etc.
Here is my code: http://pastebin.com/eJszP9v3
What happens when I get to 10? How can I automatically loop and get to 1 again?
It has to be dynamic. Is there some WHERE clause I can put in the query to look for > 10 else == 1?
Thank you for your input!And so I got lost in code...completely asphyxiated by it...
Premium WordPress plugins - Tribulant Software