Multiple page query results.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cerberusstudios
Forum Newbie
Posts: 7
Joined: Tue Apr 20, 2010 2:39 am

Multiple page query results.

Post by cerberusstudios »

Hey everyone, quick question.

I have a query that returns results into a multi-dim array, I dont want all of those to show up on one page.

I understand how to use limits and can get it to work with limits in the query; the problem I have with that solution is if a record is added or deleted between the user hitting the "next" "previous" page it will sometimes skip a result or show one multiple times. Is this just an acceptable issue not to worry about?

Another solution I have is to write my multi-dim array to an XML file and use AJAX to update it; but that could result in really big XML files and 100s of them being written and deleted and could be very cumbersome to the server.

I could also put the results into a session variable or an object and store in the sesssion that way the result set would not change until the query ran again, but I really dont like to use the session for that type of thing and I dont think that is very standard anyway.

Thanks for all of your input, I am mostly just curious what the standard is for this type of situation.
Bind
Forum Contributor
Posts: 102
Joined: Wed Feb 03, 2010 1:22 am

Re: Multiple page query results.

Post by Bind »

Post Reply