Today I spent some time carefully going through the article on this website which explains how to add next, previous and page number buttons when a result is returned from a MySQL database query.
(the article can be found at http://www.phpbuilder.com/columns/rod20000221.php3)
I'm having one or two problems with the guy's proposed solution, but for fear of going into a state of severe overwhelm, I'd like to just focus on two issues that seem to crop up when I go through the method that's explained in the article:
FIRST PROBLEM: When you do a search with the limit set at 10 (as recommended and discussed in the article) there seems to be a problem when there are more than 10 results on offer.
For example: To test the script I first entered some new records into the database which contained the word "dragon" (an unusual and fairly unique word). Now, when I have one record with dragon or three records or five or eight records that contain the word "dragon" then ALL IS WELL. I can run searches and the script seems to be ok.
BUT, as soon as I have more than ten records in my database which have the word "dragon", then the search returns no results.
SECOND PROBLEM: The first thing that the script does is check for an offset value and if there is no offset, then the script declares the offset to be 1.
But here's the problem... MySQL offset results start counting from zero! So, if you have three records that contain the result you're looking for then the PHPbuilder script will only give you two results.
This strikes me as being a serious and somewhat amature blunder from some a respectable website article. Have I missed something???
Thanks!