public function Eliminar($id) { try { $this->Link->prepare("DELETE FROM categoria WHERE id = ?")->execute(array($id)); $this->rh->SetResponse(true); } catch (Exception $e) { BaseHelper::ELog($e); } return $this->rh; }
public function Eliminar($idCarrito, $id) { try { $this->Link->prepare("DELETE FROM pedido_has_producto WHERE producto_idproducto = ? AND pedido_idPedido = ?")->execute(array($id, $idCarrito)); $this->rh->SetResponse(true); } catch (Exception $e) { BaseHelper::ELog($e); } return $this->rh; }
public function Registrar($file) { $_ext = explode('.', $file['name']); $_nombre = date('ymdhis') . '.' . $_ext[count($_ext) - 1]; move_uploaded_file($file['tmp_name'], _BASE_FOLDER_ . 'uploads\\' . $_nombre); try { $db = $this->Link->prepare("INSERT INTO archivo(Nombre, Tipo, Peso, Fecha)\n\t\t\t \t\t\t VALUES(?, ?, ?, ?)\n\t\t\t \t"); $db->execute(array($_nombre, BaseHelper::TipoDeArchivo($file['type']), $file['size'], BaseHelper::GetDateTime())); $this->rh->SetResponse(true); } catch (Exception $e) { BaseHelper::ELog($e); } return $this->rh; }
public function Lectura($id) { try { $this->Link->prepare("UPDATE entrada SET Lectura = (Lectura + 1) WHERE id = ?")->execute(array($id)); $this->rh->SetResponse(true); } catch (Exception $e) { BaseHelper::ELog($e); } return $this->rh; }