Is it possible to sort a query after I have made an SQL query?
If I submit this query:
<cfquery datasoure="database" name="test">
SELECT data FROM table
</cfquery>
And I have five items in the database:
a,b,c,d,e
and then I have list like this "e,c,b,d,a" and I want to sort the query according to the list without using SQL.
So when I ouput the query like this
<cfloop query="test">
<cfoutput>
#test.data#<br>
</cfoutput>
</cfloop>
It would display like this:
e
c
b
d
a
Start Free Trial