RE: [PHP] 5 results at a time

From: Date: Fri, 08 Sep 2000 04:07:42 +0000
Subject: RE: [PHP] 5 results at a time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15819@lists.php.net to get a copy of this message
Just go: LIMIT 5,5 - gives result 5 through to 9 etc LIMIT 10, 5 for the 3rd set of 5 - gives result 10 through to 14 > -----Original Message----- > From: Barry Young [mailto:barryy@codesmiths.com.au] > Sent: Friday, 8 September 2000 13:55 > To: php-general@lists.php.net > Subject: [PHP] 5 results at a time > > > I would like to know how to show 5 results at a time from a query > made to a > MySQL database. > I have used the limit command to give me just 5 results, as shown below: > > $result = mysql_query ("SELECT * FROM XXX > WHERE make LIKE '$make%' > AND category LIKE '$category%' > LIMIT 0,5 "); > > How do you show the next 5 results? and do you need to count the amount of > results, to know when to stop showing the next 5 results. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#15819) next »