I've never thought of doing this before, and am unsure of the risks. It's a one time session for each page, replaced by the next page visited.
What's the security risk of doing something like the following? If any?
$_SESSION['somename'] = "SELECT `something` FROM `table` WHERE `something`='blah'";
Is this a safe method, if not, what's a safer method to store a one time query that will be replaced?
It's probably safer to store queries within a temp mysql table. But I want to avoid additional mysql calls.