Re: [PHP] Limits and php...
* Thus wrote Jay Blanchard ([EMAIL PROTECTED]): > [snip] > I have been trying to understand how to write a simple code that will > let me limit the number of files view to 10 records, but I need to > under how php can look at a number of records and then caculates how > many pages it needs to show all records. Is there some sample code that > shows how to calculate and how to show limits 0,5 5,10 so on and so > on > [/snip] > > search anywhere for 'paginating records', tutorials abound. oh.. pagination... Here is some psudo advanced code, the output can be seen on my stats pages. http://zirzow.dyndns.org/html/php/code/paginate.php Curt -- List Stats: http://zirzow.dyndns.org/html/mlists/php_general/ "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Limits and php...
[snip] I have been trying to understand how to write a simple code that will let me limit the number of files view to 10 records, but I need to under how php can look at a number of records and then caculates how many pages it needs to show all records. Is there some sample code that shows how to calculate and how to show limits 0,5 5,10 so on and so on [/snip] search anywhere for 'paginating records', tutorials abound. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limits and PHP
You'd actually do it with LIMIT in your MySQL statement. There's an article on phpbuilder.com http://phpbuilder.com/columns/rod20001214.php3 or check out LIMIT in the MySQL manual. Justin French Creative Director http://Indent.com.au on 11/04/02 9:50 PM, Chuck "PUP" Payne ([EMAIL PROTECTED]) wrote: > Hi, > > I would to know what is a good example of how to use limits within PHP. I > have an SQL statement that looks at a database and pulls from it and all > items in it, but like to be able to show let said ten items on one page then > you press like to get the next twenty and so and so until there is no more. > Is this hard to do? > > > Chuck > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php