Support

Home Forums Event Espresso Premium Order by start_time

Order by start_time

Posted: September 8, 2012 at 5:50 am


Tony White

September 8, 2012 at 5:50 am

Problem A: I also found that multiple events on the same day would not always appear in the correct order, ie events starting at 4pm would appear before events starting at 9am.

Solution: Edit template/event_list.php and add ‘ORDER BY date(start_date) + start_time’ as below

$sql .= $order_by != ‘NULL’ ? ” ORDER BY ” . $order_by . ” ASC ” : ” ORDER BY date(start_date) + start_time, id ASC “;

This will ensure that events appear in the time order even if created after the later events.


Problem B: I have noticed that when you use events events that have multiple times the dropdown list it does not order the list correctly… instead of having the 8am session first the 1pm session was showing.

Solution: Edit the indcludes/functions/time_date.php and on line 176 add –
‘order by start_time’ to the sql query (as below)

$sql = “SELECT * FROM ” . EVENTS_START_END_TABLE . ” WHERE event_id='” . $event_id . “‘ order by start_time”;

This change will be overwritten on update (unless it is changed, please!)


Hope these help someone
Cheers
Tony


Dean

September 10, 2012 at 1:09 am

Thanks Tony,

We are looking more into the order by aspect which should be improved in the 3.1.27 release, but I’ll make sure the devs see this post!


Seth Shoultes

  • Support Staff

July 16, 2013 at 1:34 pm

Thanks again Tony! This will actually be added to 3.1.36.

The support post ‘Order by start_time’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Seth Shoultes 6 years, 8 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!