Let's say that I want to perform 2 MySQL operations:
Operation 1:
SELECT * From Comments ORDER BY ID DESC
Operation 2:
SELECT * From Comments WHERE Date >'2012-05-01', ORDER BY ID ASC
Clearly, the second table is contained within the first; the specifics are just hypothetical. My question: Rather than perform 2 separate MySQL queries as done above, is it possible to obtain just the first, use it, then LATER manipulate it using php to obtain the second? In the example above, the php function would need to alter the order of the table and remove inapplicable rows, but again, it's just an example.
Why do I care?
Well, I'm trying to limit the number of MySQL connections to my server. Rather than have 5 separate queries that reference the same one master table, I'd prefer to have just 1, and use php to manipulate it 4 times so as to get the same final product.
Thanks!