_rsvp_attendance_totals

Definition

_rsvp_attendance_totals($rid)
rsvp/rsvp.module, line 1511

Description

  • Returns an rsvp's attendee response totals
*
  • *

Parameters

$rid The rid of the rsvp instance.

  • @return dbresultset of the requested attendees.

Code

<?php
function _rsvp_attendance_totals($rid) {
  $responses = array(t('No Response') => 'none', t('Yes') => 'yes', t('No') => 'no', t('Maybe') => 'maybe');
  foreach ($responses as $key => $response) {
    $total = db_fetch_object(db_query('SELECT count(*) as total FROM {rsvp_invite} WHERE rid = %d AND response = \'%s\'', $rid, $response));
    $totals[$key] = $total->total;
  }
  return $totals;
}
?>