add total number of page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mayt
Forum Newbie
Posts: 2
Joined: Mon Jan 30, 2006 7:26 pm

add total number of page

Post by mayt »

hi guys, im just a newbie in php, Im using a mySql database together with php to save records, If I add records I
want to display them in multiple pages like below,

Goto page 1, 2, 3 ... 1009, 1010, 1011 Next

how to query that? example I want all the new topics to be in the first page

example 1 of 5 as I add records the old records moves to another page?

thanks in advance
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

search for pagination. If you want, you can have a look at this class which implements pagination.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I've written a pagination class found in the Code Snipplet forum, if your interested.
mayt
Forum Newbie
Posts: 2
Joined: Mon Jan 30, 2006 7:26 pm

thanks

Post by mayt »

thanks
Post Reply