You are here

function _signup_event_reminder_sql in Signup 5.2

Same name in this branch
  1. 5.2 includes/event.5x-1.inc \_signup_event_reminder_sql()
  2. 5.2 includes/event.5x-2.inc \_signup_event_reminder_sql()
Same name and namespace in other branches
  1. 6.2 includes/event.6x-2.inc \_signup_event_reminder_sql()
  2. 6 includes/event.6x-2.inc \_signup_event_reminder_sql()
  3. 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-1.inc, line 13
Code required to support version 5.x-1.* of the event module.

Code

function _signup_event_reminder_sql($content_type) {

  // We must manually include this here as the event module doesn't
  // include timezone support on all page requests.
  require_once drupal_get_path('module', 'event') . '/event_timezones.inc';
  return array(
    'fields' => array(
      'e.event_start',
      'e.timezone',
    ),
    'joins' => array(
      'INNER JOIN {event} e ON e.nid = n.nid',
    ),
    'where' => array(
      '(' . time() . ' > (e.event_start - ((s.reminder_days_before) * 86400)))',
      '(' . time() . ' <= e.event_start)',
    ),
  );
}