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