function update() { $dbo = Pommo::$_dbo; if (!empty($this->_sent)) { $a = array(); foreach ($this->_sent as $e) { $a[] = $this->_hash[$e]; } $query = "\n UPDATE " . $dbo->table['queue'] . "\n SET status=1\n WHERE subscriber_id IN(%q)"; $query = $dbo->prepare($query, array($a)); if (!$dbo->query($query)) { $this->shutdown('Database Query failed: ' . $query); } } if (!empty($this->_failed)) { $a = array(); foreach ($this->_failed as $e) { $a[] = $this->_hash[$e]; } $query = "\n UPDATE " . $dbo->table['queue'] . "\n SET status=2\n WHERE subscriber_id IN(%q)"; $query = $dbo->prepare($query, array($a)); if (!$dbo->query($query)) { $this->shutdown('Database Query failed: ' . $query); } } // add notices Pommo_Mail_Ctl::addNotices($this->_id); // reset sent/failed $this->_sent = $this->_failed = array(); return; }