into a db, maybe create a query and do a query of a query?
You would loop through each row and add them to your new query and
then do a select and sort it by the date
Look up QueryNew()
something like:
<cfset myQuery = QueryNew("account, date, image")>
Hope that helps
On Wed, 30 Jun 2004 09:45:33 -0400, Jeff Waris <[EMAIL PROTECTED]> wrote:
> Got a real odd sorting problem here, and I am kind of stumped....
>
> Using CFHTTP, I generate a file on the fly that contains some user
> information. It has three fields on each line, constituting 1 record. This
> file cannot be formatted any other way. I have no control over it. (Until it
> gets to me)
>
> the file is formatted like this
>
> 11111111,01-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,02-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,03-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,04-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 22222222,01-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 22222222,02-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 22222222,03-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 22222222,04-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
>
> Field one is an account number, field two is a date and the third field is
> an associated picture(uniquely named for each line) The dates may range over
> a year or two. the file is sorted by account number then by date ascending.
> I need to sort by account number then by date DESCENDING.
>
> I've tried to sort descending, by treating each line as a list item using
> listsort(). It almost works. For everything under a year, the list sort is
> fine, but anything with entries over 1 year for an account I would get this:
>
> 11111111,01-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,01-01-2004,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,02-01-2003,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,02-01-2004,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,03-01-2004,xxxxxxxxxxxxxxxxxxx.jpg
> 11111111,04-01-2004,xxxxxxxxxxxxxxxxxxx.jpg
>
> I was thinking of putting everything in array, but I don't think I will be
> able to sort them the way I want this way either. Is there a way to do this
> without database intervention? Any help would be greatly appreciated...
>
> Thanks!
> Jeff
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

