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

2004-12-01 Thread ragan_davis
s found 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 - LIM

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. Ju

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

2004-11-24 Thread Norland, Martin
il do not necessarily represent those of St. Jude Children's Research Hospital. -Original Message- From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 2:46 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] how to implement "pages" of results Oh

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

2004-11-24 Thread Gryffyn, Trevor
> -Original Message- > From: Norland, Martin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 24, 2004 3:38 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] how to implement "pages" of results > > > Basic example: (handwritten in email client, syntax errors m

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 equa

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