RE: [PHP-DB] Page counter from a query ?

From: Date: Mon, 03 Nov 2003 20:05:42 +0000
Subject: RE: [PHP-DB] Page counter from a query ?
Groups: php.db 
Request: Send a blank email to php-db+get-31401@lists.php.net to get a copy of this message
There are a lot of paging scripts out there, you could look on hotscripts.com for some, but the query could be simple, such as this // The setup $page[1] = "0,10"; $page[2] = "10,10"; $page[3] = "20,10"; ... // The link echo " <a href=\"$PHP_SELF?pagid=1\">1</a> "; // At the top of the script $lim = $page[$pagid] // which would equal "0,10" $sql = "SELECT columns from table limit $lim"; and so on . .. Does that help? Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:gary.every@ingramentertainment.com http://accessingram.com > -----Original Message----- > From: Larry Sandwick [mailto:lgs@sarreid.com] > Sent: Monday, November 03, 2003 1:35 PM > To: php-db@lists.php.net > Subject: [PHP-DB] Page counter from a query ? > > > Is there a way to limit the number of pictures being display from a > query? > > > > Example. > > > > Let say I have 100 pictures and I would like to display only 20. How > would I put the numbers at the bottom of the page? > > > > 1 2 3 4 5 > > > > When you click on 1 you get 1 - 20, and when you click on 2 > you get 21 - > 40. I believe I can use the limit command for the query, I just do not > understand how to put the query on the number. > > > > Any help would greatly be appreciated!!! > > > > TIA > > > > > > Larry Sandwick > > Sarreid, Ltd. > > Network/System Administrator > > phone: (252) 291-1414 x223 > > fax : (252) 237-1592 > > > >

« previous php.db (#31401) next »