View Single Post
  #2 (permalink)  
Old 08-30-2005, 10:46 AM
nottheusual1 nottheusual1 is offline
WebProWorld Pro
 
Join Date: Jun 2004
Location: The Barrens of NE Ohio
Posts: 236
nottheusual1 RepRank 0
Default

Something along this line would work:

Next record:
SELECT * FROM table WHERE record_id > $current_id ORDER BY record_id LIMIT 1

Previous record:
SELECT * FROM table WHERE record_id < $current_id ORDER BY record_id LIMIT 1

Of course, sub your nomenclature for table, record_id, etc.

We use a product called CodeCharge to do a bunch of our PHP coding. Take a look:

http://www.codecharge.com

Need very few programming skills to create very useable stuff in about 8 languages (PHP, .NET, ASP, etc.)
__________________
:not_the_usual1
[you decide]
________________
All in my opinion, which, when combined carefully with a $1 bill, gets you a cup of coffee at the corner store.
Reply With Quote