Multiple page query results.
Posted: Thu Jul 15, 2010 1:48 pm
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.
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.