How to create a professional database based PHP pagination like this -
see in snapshot
2 replies to this topic
#1
Posted 09 October 2011 - 06:47 AM
|
|
|
#2
Posted 09 October 2011 - 05:33 PM
I wrote a rough and inefficient tutorial on this, the theory and method were fine it was just that I was selecting all the items at once for somethings.
Basically you use a GET request (eg viewpage.php?page=2) multiply the result by the amount of results per page and then run a MySQL query with the order and limit options...
To get the buttons you just count how many rows ae in the database divide by the results per page and use a while loop to create the links. Did you try Googling?
Basically you use a GET request (eg viewpage.php?page=2) multiply the result by the amount of results per page and then run a MySQL query with the order and limit options...
To get the buttons you just count how many rows ae in the database divide by the results per page and use a while loop to create the links. Did you try Googling?
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
#3
Posted 31 October 2011 - 11:53 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









