You are here

function notifications_update_sent in Notifications 6

Same name and namespace in other branches
  1. 5 notifications.cron.inc \notifications_update_sent()
  2. 6.2 notifications.cron.inc \notifications_update_sent()
  3. 6.3 notifications.cron.inc \notifications_update_sent()

Update user last time sent for each sending method / interval

2 calls to notifications_update_sent()
notifications_process_queue in ./notifications.cron.inc
Process subscriptions queue
notifications_process_rows in ./notifications.cron.inc
Process rows given query conditions

File

./notifications.cron.inc, line 332

Code

function notifications_update_sent($uid, $method, $interval, $time) {
  db_query("UPDATE {notifications_sent} SET sent = %d WHERE uid = %d AND send_interval = '%d' AND send_method = '%s'", $time, $uid, $interval, $method);
  if (!db_affected_rows()) {
    db_query("INSERT INTO {notifications_sent}(uid, send_interval, send_method, sent) VALUES(%d, '%d', '%s', %d)", $uid, $interval, $method, $time);
  }
}