I have an issue to get the list of events by duration (DTT_EVT_end – DTT_EVT_start).
I’m using this function
$events = EE_Registry::instance()->load_model( ‘Event’ )->get_all( array(
$where,
‘limit’ => ‘0,10’,
‘order_by’ => ‘Datetime.DTT_EVT_start’,
‘order’ => ‘ASC’,
‘group_by’ => ‘EVT_ID’
));
How can I add the custom query like that in where clause:
“DATEDIFF(Datetime.DTT_EVT_end,Datetime.DTT_EVT_start) >= 1”
The support post ‘how to get events list, filter by duration?’ 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.