Hi, I´m splitting a query in pages with 15 rows per page. But I can´t make it work. here´s how I´m doing it:
$max_rows = 15;
if(!$start)
$start = 1;
$sql = "SELECT sid, catid, aid, title, time, hometext, bodytext, counter, topic, informant, notes FROM ".$prefix."_stories $qdb ORDER BY sid DESC LIMIT $start, $max_rows";
and then, the button with Next Results:
$start = $start + $max_rows;
print("<FORM action=\"index.php\" method=\"post\">\n");
print("<INPUT TYPE=\"hidden\" name=\"start\" value=$start>\n");
print("<INPUT TYPE=\"submit\" value=\"Próximas $max_rows notícias\">\n");
print("</FORM>\n");
Anybody Could Help me?
Also, How can I put numbered pages, instead of next and previous? Like this: 1 | 2 | 3 | 4 | 5 .... till last pasge.
Thank you