> *scratches his head*
>
> Ok.. I kind of get this... I'll have to mull it over so I can see what
> you are doing... Thanks.
Well the short human-language explanation is loop over the columns in
the query and since you can treat each column as an array fetch the
array, reverse the array, then feed it into a new empty query with the
same column name.
I'm not sure if it's more or fewer lines of code, but since it loops
over the whole query once for each column to reverse them, it's probably
slower than just looping over the query once in reverse and inserting
each record into a new query that already had all the same column names.
<cfset total = qMail.recordcount />
<cfset qNew = QueryNew(qMail.columnlist) />
<cfset QueryAddRow(qNew,total) />
<cfloop index="x" from="#total#" to="1" step="-1">
<cfloop index="column" list="#qMail.columnlist#">
<cfset qNew[column][1+total-x] = qMail[column][x] />
</cfloop>
</cfloop>
In retrospect... yeah, that's fewer lines of code... and probably faster...
I did the other one kind of as a joke... don't ask, I thought it was
funny. :)
--
s. isaac dealey ^ new epoch
isn't it time for a change?
ph: 617.365.5732
http://onTap.riaforge.org/blog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307038
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4