I believe that you need to provide a comma seperated list
setAsc("dept,departments,advisor,name")
On 9/18/06, Ray Buechler <
[EMAIL PROTECTED]> wrote:
Couldn't find an answer to this in the archives and cannot believe I haven't run into it already in my own use of reactor.
How do you sort more than one column in a Reactor query?
Here is my code:
<!--- Create Advisors Gateway --->
<cfset AdvisorXMLGateway = Application.Reactor.CreateGateway("Advisor") />
<!--- Create the query --->
<cfset AdvisorXMLQuery = AdvisorXMLGateway.createQuery() />
<cfset AdvisorXMLQuery.join ("Advisor","Dept","deptXML") />
<cfset order = AdvisorXMLQuery.getorder().setAsc("Dept","Departments")>
<cfset AdvisorXMLGateway.createquery().setorder(order)>
<cfset qAdvisorXML = AdvisorXMLGateway.getByQuery(AdvisorXMLQuery) />
As you can see the query joins 2 tables. The other column I want to sort is from the other table.
I tried this <cfset order = AdvisorXMLQuery.getorder().setAsc("Dept","Departments","Advisor","name")> and while it didn't result in an error it also didn't sort the the name column.
Has anyone figured out how to do this?
Thanks,
Ray
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

