Basically, in your SQL, just use "LIMIT" 

Select * from foo where something = 'something_else' limit 0, 10;
Select * from foo where something = 'something_else' limit 10, 10;
Select * from foo where something = 'something_else' limit 20, 10;
Select * from foo where something = 'something_else' limit 30, 10;
Select * from foo where something = 'something_else' limit 40, 10;

etc...

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Tue, 23 Jan 2001, Shane McBride wrote:

> Date: Tue, 23 Jan 2001 20:59:03 -0500
> From: Shane McBride <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Help: Google like page functions
> 
> I found a great little snippet by accident that does the "Previous 123 Next"
> links. If anyone is interested, here's the link to it:
> 
> http://www.phpbuilder.net/snippet/detail.php?type=snippet&id=21
> 
> 
> ----- Original Message -----
> From: "Shane McBride" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 23, 2001 6:35 PM
> Subject: [PHP] Help: Google like page functions
> 
> 
> I thought this had been addressed earlier, but I could not find the thread.
> 
> If I have a MySQL DB that has 50 records in it and I want to display 5 per
> page. How do I do this. Also, 50 was just a nice round number, the number
> will change constantly.
> 
> All the search engines are doing this type of thing. I just can't seem to
> figure out what I should search for.
> 
> - Shane
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to