Jump to content

10 Records per page. If there is >10 records, make a new page etc...


Flukey

Recommended Posts

Hey guys,

Basically, can someone please point in the right directon to do the following:

I have a table i extrapolate data from. I want to display 10 records per page, if there is more than 10 records, then page 2 is created, if there is more than 20 records than page 3 is created etc.....

How does one do this?

Such as a forum, where post 11 goes on to page 2, post 21 goes onto page 3 etc....

Thanks,

Regards,

Flukey
[!--quoteo(post=366243:date=Apr 19 2006, 12:24 AM:name=Acey)--][div class=\'quotetop\']QUOTE(Acey @ Apr 19 2006, 12:24 AM) [snapback]366243[/snapback][/div][div class=\'quotemain\'][!--quotec--]
this an sql statement ?
[/quote]

to do?

i'm using sql to get the data:

[code] SELECT * FROM posts [/code]
[!--quoteo(post=366247:date=Apr 19 2006, 12:47 AM:name=Caesar)--][div class=\'quotetop\']QUOTE(Caesar @ Apr 19 2006, 12:47 AM) [snapback]366247[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[a href=\"http://www.phpfreaks.com/tutorials/43/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/43/0.php[/a]
[/quote]

Ah, fantastic!

Thanks a lot, i appreciate your help. My apologies for not finding that link, to be honest, i didn't know it was called 'Pagination'. So no wonder i found no results! :P

Thanks again

Flukey :)
[!--quoteo(post=366257:date=Apr 19 2006, 01:14 AM:name=Caesar)--][div class=\'quotetop\']QUOTE(Caesar @ Apr 19 2006, 01:14 AM) [snapback]366257[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You're welcome...No problem. Happy coding!
[/quote]

cheers :D I won't implement the pagination until later on. I'll report back if i get it working :)
[!--quoteo(post=366247:date=Apr 18 2006, 06:47 PM:name=Caesar)--][div class=\'quotetop\']QUOTE(Caesar @ Apr 18 2006, 06:47 PM) [snapback]366247[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[a href=\"http://www.phpfreaks.com/tutorials/43/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/43/0.php[/a]
[/quote]

Agrees its perfect.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.