Some of you are most likely rolling your eyes at a question like this. But I promos you im very good with PHP. I have just been struggling with this one subject.
What I need help with is… well… one of the reasons I am having trouble is because I have no idea what to google to find help with what I need.
But anyways, here is what I need. On a website I have been working on for quite some time I need it set up so if there is a search that returns allot of results it doesn’t print out a page that’s 5 miles long. Lets say I have a user search up something, and it returns 75 results, and I want a max of 30 results per page. SO that would be 30, 30, & 15.
To my understanding something like this would be done with $_GET, am I correct? See, I set up a similar scenario to that just a few nights ago. I just created a test database, filled it with the names of my friends and there ages, set it to auto increment the ID field, then queries the results back. But the problem is that I’m relying on the fact that in that scenario, the loop will always query where the id field is equal to a count variable I have. Ehh, I’m not sure I’m doing the best job at explaining this. Have a look yourselves.
Sorry for my code being so sloppy. I was writing it very late at night and was in that “I just want to get this done and go to bed” kind of mood. But hopefully after seeing that what im trying to say makes sense.
It relies on the ID field to function properly. But on my website, I may be dealing with ID fields that range from 10’s, to 1000’s of numbers apart. So unless I was to query every single field on every single Colum every single time a user searched, that wont work.
Geez, even after like 3 or 4 paragraphs I still feel like I did a crappy job explaining this. I hope it made at least a little sense. Feel free to ask about anything that confuses you, which I assume will be allot. Thanks to anyone who can help.
ALSO:
I feel it must be pointed out, just incase. Im dyslexic. I do my best to spell things properly and use proper grammar but I struggle allot of times. I know its not an excuse, but I just think you should be aware of it just incase I made any horrible mistakes while writing this. Haha.