Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

sorting by two parameters


Reply


3 Posts   1061 Views

Avatar
Victor

Community Member, 128 Posts

29 March 2009 at 4:52am

I want to sort by two parameters like in SQL "... ORDER BY `lastname`,'firstname`" but it seem not to work and I cannot find documentation

Thank you in advance. Victor

Avatar
Hamish

Community Member, 712 Posts

29 March 2009 at 11:06am

This should work:

$records = DataObject::get("SomeObject", "","SortFieldA ASC, SortFieldB ASC");

Avatar
Victor

Community Member, 128 Posts

29 March 2009 at 12:03pm

Edited: 29/03/2009 1:15pm

Yes, I found it. But on my way to find I found a strange error.
Thanks

Victor