You have to have primary key in your table and then you can do something like
PHP Code:
while ($row = mysql_fetch_row($result))
{
$thisId = $row["Id"];
}
$lastId = $thisId - 1;
$nextId = $thisId + 1;
and if you want to select complete records of next and prev ids then write queries based on last and next ids vars,
PHP Code:
select * from tb where id=$lasdId
select * from tb where id=$nextId
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --