Phillip Vector wrote:
> Besides doing a query within a query.. Is there any other way I can
> sort the output of cfpop so that my newest mail is at the top instead
> of the bottom?

Just because I'm in the mood to be silly. 

<cfscript>
/**
 * Reverses the order of elements in a one-dimensional array.
 * 
 * @param InArray        One-dimensional array to be reversed. 
 * @return Returna a new one dimensional array. 
 * @author Raymond Simmons ([EMAIL PROTECTED]) 
 * @version 1.0, October 9, 2001 
 */
function ArrayReverse(inArray){
        var outArray = ArrayNew(1);
        var i=0;
        var j = 1;
        for (i=ArrayLen(inArray);i GT 0;i=i-1){
                outArray[j] = inArray[i];
                j = j + 1;
        }
        return outArray;
}
</cfscript>

<cffunction name="QueryReverse" output="false">
        <cfargument name="Query" type="Query" required="true" />
        <cfset var column = "" />
        <cfset var data = "" />
        <cfset var qNew = QueryNew("") />
        
        <cfloop index="column" list="#Query.columnlist#">
                <cfset data = ArrayReverse(Query["#column#"]) />
                <cfset QueryAddColumn(qNew,column,data) />
        </cfloop>
        
        <cfreturn qNew />
</cffunction>

p.s. may be time to upgrade your server. ;) 

-- 
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:307028
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to