"Kinky" sort...

Ton Kuypers tkuypers at pandora.be
Mon Sep 19 04:45:49 EDT 2005


Hi gang,

I am out of inspiration, somebody please help me...

I've got a listbox containing a list of data:
ID    Description    Group    Date
1     text 1         group1   20050104
2     text 2         group1   20050104
3     text 3         group2   20051004
4     text 4         group3   20051004
5     text 5         group2   20050104
6     text 6                  20050204
7     text 7                  20050104
8     text 8         group1   20050104
9     text 9                  20050204
10    text 10        group3   20050104

The date column is in fact the result of the seconds-function.
The data is the result of a SQL query to mySQL

I need to sort the list on date, without splitting the groups and  
thats where I'm out of luck:
When I use
     Sort vData with item 4 of each
     Sort vData with item 3 of each
the groups are divided, when I use
     Sort vData with item 3 of each
     Sort vData with item 4 of each
the result first shows the lines without any groups, followed by the  
lines containing groups.

How do I display these lines in the correct order without splitting  
the groups?
The dates within a group could differ (but not likely) but in that  
case the first first date should be the line to sort.

Anybody any suggestions for using a kinky SQL statement or how to  
setup a sort in RR?

Regards & many thanks in advance,

Ton Kuypers


More information about the use-livecode mailing list