[Zope] - How to specify multiple sort columns when grouping with IN

Brad Clements bkc@murkworks.com
Tue, 19 Jan 1999 16:47:29 -0500


I'm using a ZSQL method to Select rows from a database.

Depending on user input, I may need to group by "apt_use, faa_cnty, 
faa_city, apt_name" (in that order).

I want to use things like first-APT_USE, first-FAA_CNTY, etc.

My database has individual indexes on all of the above fields, but there 
isn't a single index on all of these fields.

I've been using <!--#in AirportLookup sort=name-->

To group, do I need to create a new combined key in the database, or 
can I specify something like sort="apt_use;faa_cnty;faa_city"  etc. (it 
doesn't work) but something like that, or will the use of the first- tags 
automatically cause grouping?



Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               ICQ: 14856937

We must come down from our heights, and leave our straight 
paths, for the byways and low places of life, if we would 
learn truths by strong contrasts; and in hovels, in forecastles, 
and among our own outcasts in foreign lands, see what has been 
wrought upon our fellow-creatures by accident, hardship, or vice. 
- Richard Henry Dana, Jr. 1836