- 获取当前文章的$id
- 查询当前表的$id
- 用当前文章的$id与查询当前表的$id作比较,小于则为上一篇
- 查询语句为升序,大于则为上一篇
$r = $db->get_one("SELECt itemid from {$table} where linkurl like '%$id%'ORDER BY itemid desc LIMIT 1", 'CACHE');
$hang = $db->query("select * FROM {$table} where itemid < $itemidl ORDER BY itemid desc LIMIT 1 ");
while($ha = $db->fetch_array($hang)) {