本文整理汇总了PHP中Audit::Journal方法的典型用法代码示例。如果您正苦于以下问题:PHP Audit::Journal方法的具体用法?PHP Audit::Journal怎么用?PHP Audit::Journal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Audit
的用法示例。
在下文中一共展示了Audit::Journal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DeleteAssociatedAuditAsCreatedBy
/**
* Deletes an associated AuditAsCreatedBy
* @param Audit $objAudit
* @return void
*/
public function DeleteAssociatedAuditAsCreatedBy(Audit $objAudit)
{
if (is_null($this->intUserAccountId)) {
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAuditAsCreatedBy on this unsaved UserAccount.');
}
if (is_null($objAudit->AuditId)) {
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAuditAsCreatedBy on this UserAccount with an unsaved Audit.');
}
// Get the Database Object for this Class
$objDatabase = UserAccount::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`audit`
WHERE
`audit_id` = ' . $objDatabase->SqlVariable($objAudit->AuditId) . ' AND
`created_by` = ' . $objDatabase->SqlVariable($this->intUserAccountId) . '
');
// Journaling
if ($objDatabase->JournalingDatabase) {
$objAudit->Journal('DELETE');
}
}