[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] limit contral
From:       Jono Bacon <jonobacon_lists () yahoo ! co ! uk>
Date:       2003-02-19 12:36:19
[Download RAW message or body]

James Shergold wrote:

>Hi, all
>
>I'm quite new to php and still finding my way round and came
>across a problem.
>
>I'm making a script that pulls property (house) from a mysql
>database in categories e.g. there cat1, cat2 ect and in each
>category I only want to show 10 properties a time then click
>next to show the next 10 properties in that catorgy.
>
>here is the main part of the script
>http://www.smoothdesign.com/green/
>
>if anyone can help that would be great.
>
>James
>james@smoothdesign.com
>
>
>  
>
Hi James,

You can limit the number of results using SQL:

    SELECT foo FROM bar ORDER by blah LIMIT 10

As for showing a page at a time - I have not done this before in PHP, 
but it is referred to as paging. Have a search on google and I am sure 
you will find a solution.

    Jono




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic