I have struggled for some time with the multi-key sort issue in 
SQLObject 0.8, and I can't seem to find any comments on the mailing list 
lately (if at all) that are on-point, at least for my newbie level of 
understanding, so I thought I'd throw this question out there, to see 
what the best approach would be.

Is there an SQLObject way to do a sort using 2 or more keys without 
hand-crafted SQL code?

Example:  Let's say we have a table called Music, with columns:

Artist
Year
TrackName

And we want to get a sorted list showing all the TrackNames, but sorted 
first by Year, and then by Artist and TrackName.

1967
   Joplin
     Song 1
     Song 2
   Hendrix
     Song A
     Song B
1968
   Joplin
     Song 3
     Song 4
   Cream
     Song X
     Song Y

In SQL, I think we would just do:

SELECT Year, Artist, TrackName FROM Music ORDER BY Year, Artist, Track

What if any is the equivalent syntax in SQLObject for this kind of 
multi-key sort?  All I can find is the single column syntax for orderBy, 
but I am not sure how to render this as a 2 or more key argument.

Much Thanks,

- MichaelG








-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to