On 6 September 2012 11:26, Johann Spies <[email protected]> wrote:
> I have been using session a lot to store queries. > Actually this statement is wrong. I have been storing the variables in the session necessary to build a query. Trying a shortcut (storing the query itself in the sesison) is not working although I can in some cases pass it with request.vars to another function. Situation where I was trying to use this: function a: search form (several fields) redirecting to function b function b: build the query from request.vars and call a SQLFORM.grid to show the results. This works only for the first page of the grid. As soon as the client click on the second (or other page) the query is lost. My workaround now: Store the request.vars used to build the query in the session and use it from there and remember to clean up the session variables afterwards. Is there another, more efficient way which will eliminate the need to rebuild the query every time a new page of the grid is visited? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

