本文整理匯總了PHP中Meta::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Meta::delete方法的具體用法?PHP Meta::delete怎麽用?PHP Meta::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Meta
的用法示例。
在下文中一共展示了Meta::delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: json_decode
<?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'));
}
}
示例2: delete
/**
* 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());
}
示例3: delete
public function delete($rm_img = true)
{
if ($rm_img) {
$this->image->delete();
}
parent::delete();
}
示例4: 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());
}