function _signup_event_reminder_sql in Signup 7
Same name and namespace in other branches
- 5.2 includes/event.5x-1.inc \_signup_event_reminder_sql()
- 5.2 includes/event.5x-2.inc \_signup_event_reminder_sql()
- 6.2 includes/event.6x-2.inc \_signup_event_reminder_sql()
- 6 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 - @todo Please document this function.
File
- includes/
event.6x-2.inc, line 6
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,
);
}