Pagination
Date: 03/07/07
(PHP Community) Keywords: database
Hi
I am working with a database where when users search they are only given the first 500 records (or however many fit their search criteria should it be less than 500). I want to have pagination set up so that there are 50 records per page. I used the tutorial found here however when I go from page to page using the "Next" or "Previous" links (or any of the other ones) it searches without the WHERE clause - the select statement being used reverts to "SELECT * FROM tablename LIMIT 0,50". You can see it in action at http://www.a5data.com/demo/ .
I of course want it to remain "SELECT * FROM tablename WHERE [whereclause info]" with the pagination as well as the 500 records limit. Is this possible? If so, how would I go about doing it?
Any help to solve this would be greatly appreciated as I'm banging my head against the wall trying to get this fixed.
Thanks!
Source: http://community.livejournal.com/php/548918.html