I need to get the previous and next ID's from a table. The table has a group that they are in as well. I have the following code, but it will only pull the ID of the current page.
$sqlnext = mysql_query ("SELECT * FROM tutorials WHERE id > '$id' AND series='$series' ORDER BY id LIMIT 1");
$rownext = mysql_fetch_array ($sqlnext);
$nextid = $row['id'];
$nextname = $row['name'];
if((!empty($nextid)) && ($nextid != $id))
I can offer more code if needed.