I’m new to Yii and currently having problem with my code.
I have actionExecute in my controller which executes a query and renders the result (potentially huge amount of data) in a page with CGridView. What I want is a download link (or button) in the same page as the CGridView. How do I pass the query result to the action that handles the download link (or button)?
At least I have two options:
Save the result in user state, which terribly burdens the server.
Save the query string in user state, and when clicking download the query is executed again.
I think there may be variations on your actual code and db query, but I think I’d written a second db request, but using together with cache, thus serving results from cache if the result hasn’t changed.