You could save the query results into an array - (use getAll() in adodb) then sort the array.
I haven't used this - but it would save you from requerying, but speed wise if your table is well indexed then you might be able to query faster.
Another option which might be fast for MySQL databases - would be to save the results of the query into a Memory (HEAP) table and then query the Memory table.