(8 дек 2014, 19:36) (
0/
0)
[
0]
beauty_free, не поделишься?
(8 дек 2014, 19:05) (
0/
0)
[
0]
$list = mysql_fetch_assoc(mysql_query('SELECT * FROM `pers` WHERE `id` = ' . intval($_GET['list']) . ' AND `type` = "list" LIMIT 1'));
$next_list = mysql_fetch_assoc(mysql_query('SELECT * FROM `pers` WHERE `type` = "list" AND `id` > ' . $list['id'] . ' ORDER BY `id` ASC LIMIT 1'));
$prev_list = mysql_fetch_assoc(mysql_query('SELECT * FROM `pers` WHERE `type` = "list" AND `id` < ' . $list['id'] . ' ORDER BY `id` DESC LIMIT 1'));
<a href="?pers&list=' . $prev_list['id'] . '">Назад</a>
<a href="?pers&list=' . $next_list['id'] . '">Далее</a>
С условиями сам разбирайся)