Alphabetical listing

2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 27, 2009   (RSS)

By Moonworks - August 27, 2009

I'm trying to get my list page to run alphabetically, but it doesn't want to play right.

I'm using:

'orderBy' => 'dragSortOrder DESC, title',

But it doesn't change anything.
High quality residential training for writers, actors & Film Making - Click Here for further information

Re: [Moonworks] Alphabetical listing

By Chris - August 27, 2009

Hi Moonworks,

You'll want to replace that with this:

'orderBy' => 'title',

If you have a comma-separated list in your orderBy, MySQL will sort on the first field (dragSortOrder, in your example above) and only sort on the second field if it finds rows where the first field is identical. For example, a phone book is sorted "lastName, firstName".
All the best,
Chris