order by
6 posts by 2 authors in: Forums > CMS Builder
Last Post: December 17, 2008 (RSS)
By Moonworks - December 17, 2008 - edited: December 17, 2008
I have created an events listing, and I am wanting it to go in order of date. Once in date order, it would then go in time order if possible.
What is the command that I'd need to have in the 'order by' in the 'sorting' section? or would I deal with this somewhere else?
The two field names I have are:
event_date
start_time_hour
I seem to have tried everything, and when trying some of the examples shown, I seem to get errors.
Please help, I don't like being bald!
Thanks,
Joe
Re: [Moonworks] order by
By Dave - December 17, 2008
Try this under Admin > Section Editors > Sorting:
event_date DESC, start_time_hour+0 DESC
First confirm the dates are sorting the way you want, if you want to reverse them remove "DESC" (for descending).
Next, confirm the hours and sorting the way you want. To reverse those remove DESC as well.
Hope that helps. Note that if your hours are not in 24 hour format it will sort am and pm values together since they'll have the same values.
Hope that helps!
interactivetools.com
Re: [Dave] order by
I tried that, the full thing I have with no errors showing is:
dragSortOrder, event_date DESC
I'm just doing one thing at a time, so starting with date.
It is still going in a weird order, as I added them.
http://www.fareham.ws/eventslist.php
Joe
Re: [Moonworks] order by
By Dave - December 17, 2008
You want to remove "dragSortOrder," from the beginning. It should work then.
You can't sort by dragSortOrder _and_ date. You may need to remove dragSortOrder.
interactivetools.com
Re: [Dave] order by
Do you mean remove it from the main lust as well?
Sorry, brain is pretty dead, just going on to hour 15 workign on this today [:/]
Re: [Moonworks] order by
By Dave - December 17, 2008
Let me know how that goes.
interactivetools.com