/** * Suppression d'un accessoire donné. * * @param integer $id * @return boolean */ public function delAccessory($id) { if (!$this->accessoryExists($id)) { $this->error->set(sprintf(__('m_estimate_accessory_%s_not_exists'), $id)); return false; } $query = 'DELETE FROM ' . $this->t_accessories . ' ' . 'WHERE id=' . (int) $id; if (!$this->db->execute($query)) { return false; } $this->db->optimize($this->t_accessories); return true; }
/** * Suppression d'un produit donné. * * @param integer $id * @return boolean */ public function delProduct($id) { if (!$this->productExists($id)) { $this->error->set(sprintf(__('m_estimate_product_%s_not_exists'), $id)); return false; } $query = 'DELETE FROM ' . $this->t_products . ' ' . 'WHERE id=' . (int) $id; if (!$this->db->execute($query)) { return false; } $this->db->optimize($this->t_products); return true; }
public static function resetVotes() { parent::execute("UPDATE country SET country_votes = 0, country_state = 'queued'"); }
public static function clear() { //parent::execute('TRUNCATE TABLE ipvotes'); //Truncate is extremely slow parent::execute('DELETE FROM vote'); }