You are here

function event_select in Event 5.2

Return SQL string for SELECT statement

The returned string will make sure your event dates are correctly returned according to the site setting for "event_timezone_display". event_$type will be available from the query.

Parameters

$type either 'start' or 'end':

Related topics

File

./event.module, line 1176

Code

function event_select($type = 'start') {
  event_include_files();
  switch (variable_get('event_timezone_display', 'event')) {
    case 'user':
      $result = event_where_user($type) . ' AS event_' . $type;
      break;
    case 'site':
      $result = event_where_site($type) . ' AS event_' . $type;
      break;
    case 'event':
      $result = event_where_event($type) . ' AS event_' . $type;
  }
  return $result;
}