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
Link to comment
Share on other sites

[!--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]
Link to comment
Share on other sites

[!--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 :)
Link to comment
Share on other sites

[!--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 :)
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.