本文整理汇总了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());
}