Welcome Guest, Not a member yet? Register   Sign In
Question on pagination and search results
#1

[eluser]tim1965[/eluser]
Hi

I have setup pagination for the first time and have got it working correctly. However i have a problem when i move to the next page as essentially it re-runs the query and uses an offset in the url to bring back the next batch of results.
So the problem i have is that i have a heavily parameterised search page and obviously the parameters are lost when you move from the initial results page to the next page.
So my question is how do other people handle this. I also know this will be a problem with breadcrumbs as well, so i am trying to find a generic solution to this issue.
Should i store the results of the search in a db and if so how do i go about this. Any examples of what other people do would be great.
Thanks in advance.
#2

[eluser]jedd[/eluser]
[quote author="tim1965" date="1257191416"]
So the problem i have is that i have a heavily parameterised search page and obviously the parameters are lost when you move from the initial results page to the next page.
[/quote]

Obviously?

I see two approaches to this problem - store the parameters in session data, or store them in a single array which you then serialise and push into the URL somewhere. Or, if you like, a combination of the two (which is not as ugly as it sounds, as the user sometimes expects certain settings to last for the whole session, and others for the current action only).




Theme © iAndrew 2016 - Forum software by © MyBB