You are here

function Notifications_Queue::queue_update_sent in Notifications 6.4

Update user last time sent for each destination / interval

Parameters

$mdid: Destination id

$interval: Send interval

$time: Timestamp, when notifications were sent

$counter: How many messages were sent

1 call to Notifications_Queue::queue_update_sent()
Notifications_Queue::process_group in includes/notifications_queue.class.inc
Process queued rows, send messages, etc, etc...

File

includes/notifications_queue.class.inc, line 510

Class

Notifications_Queue
Queue management and processing

Code

function queue_update_sent($mdid, $interval, $time, $counter = 1) {
  db_query("UPDATE {notifications_sent} SET sent = %d, counter = counter + %d WHERE mdid = %d AND send_interval = '%d'", $time, $counter, $mdid, $interval);
  if (!db_affected_rows()) {
    $this
      ->queue_init_interval($mdid, $interval, $time, $counter);
  }
}