function _signup_event_reminder_sql in Signup 5.2
Same name in this branch
- 5.2 includes/event.5x-1.inc \_signup_event_reminder_sql()
- 5.2 includes/event.5x-2.inc \_signup_event_reminder_sql()
Same name and namespace in other branches
- 6.2 includes/event.6x-2.inc \_signup_event_reminder_sql()
- 6 includes/event.6x-2.inc \_signup_event_reminder_sql()
- 7 includes/event.6x-2.inc \_signup_event_reminder_sql()
Return value
Array of SQL clauses for cron reminder email query builder.
1 call to _signup_event_reminder_sql()
- signup_reminder_sql in includes/
scheduler.inc
File
- includes/
event.5x-2.inc, line 13 - Code required to support version 5.x-2.* of the event module.
Code
function _signup_event_reminder_sql($content_type) {
global $db_type;
event_include_files();
switch ($db_type) {
case 'mysql':
case 'mysqli':
$where = array(
"('" . gmdate('Y-m-d H:i:s') . "' > (" . event_where_utc() . " - INTERVAL s.reminder_days_before DAY))",
"('" . gmdate('Y-m-d H:i:s') . "' <= (" . event_where_utc() . "))",
);
break;
case 'pgsql':
$where = array(
"('" . gmdate('Y-m-d H:i:s') . "' > (" . event_where_utc() . " - INTERVAL 's.reminder_days_before days'))",
"('" . gmdate('Y-m-d H:i:s') . "' <= (" . event_where_utc() . "))",
);
break;
}
return array(
'fields' => array(
event_select(),
'e.timezone',
),
'joins' => array(
event_join(),
),
'where' => $where,
);
}