I'm stuck on creating a php pagination script that I want. I've tried loops, etc, and it's not doing the job.. Here's my code for my database that gets what I have now using previous and back links
$db->open("SELECT count(*) as cnt FROM songlist $where ");
$row = $db->row();
$cnt = $row["cnt"];
//Now grab a section of that
//ORDER BY artist ASC, title ASC
$db->open("SELECT * FROM songlist $where", $limit, $start);
$first = $start+1;
$last = min($cnt,$start+$limit);
$rc = $start;?>
I am trying to create pagination like on the bottom of this site: http://www.lite945.com/iplaylist/playlist.html
Notice how currently the 1-20 is bold, and if you click on another number say 21-40 and on that it goes bold. That's exactly what I am trying to do.
I already have my SQL statements to. It get's the $rc fine on my page I have, where it shows 1-20 on the rows, but I am unable to figure out how to do the bottom pagination style. I've been trying this for a long time and can't figure it out for the life of me. Any help would greatly be appreciated! Thanks!