if ( isset( $whereParts ) && !empty( $whereParts ) ) {
$where = implode( ' AND ', $whereParts);
}
- //echo '<pre>$where: ' . print_r( $where, true ) . '</pre>';
$events = $this->getList( $where, $order );
if ( $eventDay ) {
$fromDate = $toDate = $eventDay;
$from = $to = date( 'Y-m-d', strtotime( $eventDay ) );
+ $this->dateRange = "id IN (
+ SELECT id
+ FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times
+ WHERE DATE(start_time) = '{$from}')";
}
}
- $this->dateRange = "start_time <= CAST('{$from}' AS DATE) AND start_time >= CAST('{$to}' as DATE)";
}
- //echo '<pre>dateRange: ' . print_r( $this->dateRange, true ) . '</pre>';
if ( isset( $_REQUEST['event_name'] )
&& $eventNameSearch = filter_var( $_REQUEST['event_name'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ) ) {