本文整理汇总了PHP中file_storage::action_delete方法的典型用法代码示例。如果您正苦于以下问题:PHP file_storage::action_delete方法的具体用法?PHP file_storage::action_delete怎么用?PHP file_storage::action_delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类file_storage
的用法示例。
在下文中一共展示了file_storage::action_delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: files
function action_delete()
{
log_debug("journal_process", "Executing action_delete()");
/*
Start Transaction
*/
$sql_obj = new sql_query();
$sql_obj->trans_begin();
/*
Delete files (if applicable)
*/
if ($this->structure["type"] == "file") {
$file_obj = new file_storage();
$file_obj->data["type"] = "journal";
$file_obj->data["customid"] = $this->structure["id"];
$file_obj->load_data_bytype();
$file_obj->action_delete();
}
/*
Delete journal record
*/
$sql_obj->string = "DELETE FROM `journal` WHERE id='" . $this->structure["id"] . "' LIMIT 1";
$sql_obj->execute();
/*
Commit
*/
if (error_check()) {
log_write("error", "journal_process", "An error occured preventing the journal record from being deleted");
$sql_obj->trans_rollback();
return 0;
} else {
log_write("notification", "journal_process", "Journal record cleanly removed.");
$sql_obj->trans_commit();
return 1;
}
return 0;
}