mysql select next row without knowing the id

KeyshawnJohnson

New Member
Is there an easy way to do both these queries in one:\[code\]$name = 'somename';$id = mysql_result(mysql_query('SELECT id FROM table WHERE name = $name'));$next_id = mysql_result(mysql_query('SELECT id FROM table WHERE id > $id ORDER BY id ASC LIMIT 1, 1'));\[/code\]Thanks
 
Back
Top