public function eliminarLocalidadUsuario($id_usuario = NULL, $localidad = NULL) { $table = new \apf\db\mysql5\Table("usuarios_ubicaciones"); $delete = new \apf\db\mysql5\Delete($table); $where = array(array("field" => "id_usuario", "value" => $id_usuario), array("operator" => "AND"), array("field" => "id_localidad", "value" => $localidad)); $delete->where($where); $res = $delete->execute(); return $res; }
public function borrarCategoria($todo = FALSE) { $table = new \apf\db\mysql5\Table("ofertas_categoria"); $delete = new \apf\db\mysql5\Delete($table); $where = array(array("field" => "id_oferta", "value" => $this->_id)); if (!$todo) { $where[] = array("operator" => "AND"); $where[] = array("field" => "id_categoria", "value" => $this->_categoria->getId()); } $delete->where($where); return $delete->execute(); }
public function delete() { $table = new \apf\db\mysql5\Table($this->_table); $delete = new \apf\db\mysql5\Delete($table); $where = array(array("field" => "id", "value" => $this->_id)); $delete->where($where); return $delete->execute(); }