I need to build a query that needs to find the previous or next record in a
database using a form. The records are numbered using a field called
'sb_num'. This field is initially set using the form.
Would something like this work
Next:
Select 'field1', 'field2' from table order by sb_num where $sb_num>=++sb_num
limit 1
Previous
Select 'field1', 'field2' from table order by sb_num desc where
$sb_num<=--$sb_num limit 1
Luis
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]