PDA

View Full Version : checking for more records for pagenav


N!ck
03-05-2003, 08:54 PM
I'm having a little bit of trouble with this bit of code:


$nstart=$start+$imagesperpage;
$checknext=$DB_site->query_first("SELECT COUNT(*) AS total FROM photo WHERE userid='".intval($userid)."' LIMIT ".$nstart.", ".$imagesperpage);
if ($pagenumber>0) {
eval("\$prevlink = \"".gettemplate("pagenav_prevlink")."\";");
} else {
$prevlink=" ";
}
if ($checknext[total]>0) {
eval("\$nextlink = \"".gettemplate("pagenav_nextlink")."\";");
} else {
$nextlink=" ";
}


It doesn't seem to want to output the pagenav_nextlink template even when there are more records to be shown. Can anyone shed some light on this?

Thanks,
Nick

N!ck
03-05-2003, 10:29 PM
never mind, i just learned how to use getpagenav() instead. i still don't know what the problem was though. oh well, it's fine now.