i'd say go back to the original code i gave ya
PHP Code:
$shoutbox_num = $DB_site->query("SELECT MIN(shoutid) AS min, MAX(shoutid) AS max FROM shoutbox_posts");
$shoutbox_posts = $DB_site->query("
SELECT s.*, u.username AS absusername
FROM shoutbox_posts AS s
LEFT JOIN user AS u ON (s.userid = u.userid)
WHERE (deleted = 0 OR deleted IS NULL)
AND shoutid > (($shoutbox_num[max] + $shoutbox_num[min]) - $vboptions[shoutbox_numberofforumhomeshouts])
ORDER BY shoutid ASC
");
that works