Hey guys. Well I've tried so many pagination codes out there but not so similar to how I want it. Just to let everybody know, I am a TOTAL noob. Ive been searching for almost 2 weeks and I have no solution to my pagination issue. I have a question regarding a games search results page with its pagination. Here is the database I am using:
Heres an example database with 5 columns that I have:
fldID | fldTitle | fldCategory | fldIconMedium | fldLink |
2415 Krusty Fun House Skills krusty.jpg games.php?id=2415
2415 Krusty Fun House Skills krusty.jpg games.php?id=2415
2415 Krusty Fun House Skills krusty.jpg games.php?id=2415
2415 Krusty Fun House Adventure krusty.jpg games.php?id=4536
2415 Krusty Fun House Skills krusty.jpg games.php?id=2415
2415 Krusty Fun House Action krusty.jpg games.php?id=1511
2415 Krusty Fun House Skills krusty.jpg games.php?id=2415
2415 Krusty Fun House Shooter krusty.jpg games.php?id=6631
And I can show an example of what I am trying to build:
=========================================================================
Results 1 of 16 - 185
========== ========== ========== ========== ==========
fldIconMedium fldIconMedium fldIconMedium fldIconMedium fldIconMedium
Image Image Image Image Image
========== ========== ========== ========== ==========
Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle)
========== ========== ========== ========== ==========
fldIconMedium fldIconMedium fldIconMedium fldIconMedium fldIconMedium
Image Image Image Image Image
========== ========== ========== ========== ==========
Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle)
========== ========== ========== ========== ==========
fldIconMedium fldIconMedium fldIconMedium fldIconMedium fldIconMedium
Image Image Image Image Image
========== ========== ========== ========== ==========
Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle) Title (fldTitle)
1 2 3 4 Next >
=========================================================================
I want all the results displayed to be linked to their games from the 'fldLinks' column in the database which has all the links to the games.
As you can see above, it shows total records of a certain category game found. Let's assume the table that the links above are all Skill games. I am giving the amount of skill games found from the database at first (Results 1 of 16 - 185), and then displaying 15 or 16 results per page, viewing the image (fldIconMedium) of the particular games and their titles (fldTitle) below the images, both of them hyperlinked to their game pages (fldLink), and lastly it shows pagination links at the bottom with numbers along with the Prev and Next buttons, and the numbers automatically increase or decrease depending on how many games were found for that particular game category.
For example:
=========
- User clicks on link a link with '.php?cat=skills' (Hence 'cat' meaning category)
- Then results would appear like the example I made above. This can also be applied to searching for action games '?cat=action', or shooter games '?cat=shooter' from 'fldCategory', and retrieving all data from the rows of those games from 'fldCategory'. I am assuming that to search for a particular game category, for example skills, games, action, adventure etc..., you would have first look in 'fldCategory' in order to retrieve all data for 1 category, and all results found for that game category would display just like the example I made above.
.
Anybody have any ideas on how I should go about this? If you do have a code that may work for me, including its connection to database in the PHP code, it would be appreciated as I am still discovering PHP. Hopefully everybody else can benefit from it as well.
Thanks!