Re: RE: [PHP-DB] how to implement pages of results

2004-12-01 Thread ragan_davis
in the returned results of the query. Thanks for the help! mack - Original Message - From: Norland, Martin [EMAIL PROTECTED] Date: Wednesday, November 24, 2004 3:55 pm Subject: RE: [PHP-DB] how to implement pages of results Correct - LIMIT 30,2 would show 2 records starting

RE: [PHP-DB] how to implement pages of results

2004-11-24 Thread Norland, Martin
Basic example: (handwritten in email client, syntax errors may exist) if (!isset($pagenum) || $pagenum 0) { $pagenum = 0; } $range = 30; $start = $range*$pagenum; $end = $start + $range; $limit = limit $start, $end; $query = select * from $table where host='$somename'$limit; Then just pass the

RE: [PHP-DB] how to implement pages of results

2004-11-24 Thread Gryffyn, Trevor
Off the top of my head, doesn't LIMIT accept two paramters? Can't you do: LIMIT 30,2 That'd give you page 2 of a 30+ record result set, right? Using that, you can pass a page # when you click next page so previous page ends up being current page - 1 (and if that is less than 1, then it equals

RE: [PHP-DB] how to implement pages of results

2004-11-24 Thread Norland, Martin
Correct - LIMIT 30,2 would show 2 records starting with the thirtieth. thirty-first. Sheesh, I should get outta here too - ^airhead^ - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St.