"Keith Wilson (www.giraffedog.net)" <[EMAIL PROTECTED]> wrote:
> I am trying to split the results from a select query across several pages.
> 
> I have a contacts database and if someone searches for a contact who has a
> name like %mith% I want it to return the results with a page across the
> bottom, like google.
> 
> How do I do this with mySQL and ASP or PHP? I understand that I could use
> LIMIT, but has anyone got any working example of this?
> 

Yes, use LIMIT clause to get only certain number of rows. For example, to retrieve 
forst 10 rows use the following statement:
        SELECT .. FROM .. ORDER BY .. LIMIT 0,10;

Then to retrieve next 10 rows:
        SELECT .. FROM .. ORDER BY .. LIMIT 10,10; retrieve rows 11-20




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to