function Notifications_Event::update_counter in Notifications 7
Same name and namespace in other branches
- 6.4 includes/notifications_event.class.inc \Notifications_Event::update_counter()
Update event counter
File
- ./notifications.event.inc, line 395 
- Drupal Notifications Framework - Default class file
Class
- Notifications_Event
- Notifications Event class
Code
function update_counter($value = NULL) {
  if (isset($value)) {
    $this->counter = $value;
  }
  db_query('UPDATE {notifications_event} SET counter = :counter WHERE eid = :eid', array(
    ':counter' => $this->counter,
    ':eid' => $this->eid,
  ));
}