<?php /** * Elimina una meta de la base de datos * distinguida por su identificador */ require 'Meta.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Decodificando formato Json $body = json_decode(file_get_contents("php://input"), true); $retorno = Meta::delete($body['idMeta']); if ($retorno) { print json_encode(array('estado' => '1', 'mensaje' => 'Eliminación exitosa')); } else { print json_encode(array('estado' => '2', 'mensaje' => 'Eliminación fallida')); } }
/** * Delete the Wiki and all its versions */ public function delete() { parent::delete(); XDB::execute('DELETE FROM wiki_version WHERE wid = {?}', $this->id()); XDB::execute('DELETE FROM wiki WHERE wid = {?}', $this->id()); }
public function delete($rm_img = true) { if ($rm_img) { $this->image->delete(); } parent::delete(); }
public function delete() { parent::delete(); XDB::execute('DELETE FROM remote_groups WHERE remid = {?}', $this->id()); XDB::execute('DELETE FROM remote WHERE remid = {?}', $this->id()); }