Sort by 2 fields

4 posts by 3 authors in: Forums > CMS Builder
Last Post: July 11, 2012   (RSS)

Hi

Any ideas how I can sort by 2 different fields. I need to sort by 'building' first, then 'unit_no', but it's coming back with the unit numbers in this order

F14
F8
F35
F39
F707
...when they need to be sequential.
I've tried this code 'orderBy' => 'building','unit_no' ,
but it's not working. Any ideas?
thanks

Re: [degreesnorth] Sort by 2 fields

By gkornbluth - July 10, 2012

Not sure, but have you tried 'unit_no DESC' ?

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Sort by 2 fields

Thanks, tried that, but it still doesn't work?