本文整理汇总了PHP中Dal::execute_post_hooks方法的典型用法代码示例。如果您正苦于以下问题:PHP Dal::execute_post_hooks方法的具体用法?PHP Dal::execute_post_hooks怎么用?PHP Dal::execute_post_hooks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dal
的用法示例。
在下文中一共展示了Dal::execute_post_hooks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute_multiple
public static function execute_multiple($sql, $args = array(NULL))
{
global $query_count_on_page;
$db = Dal::get_connection();
$sql = Dal::validate_sql($sql);
$prh = $db->prepare($sql);
if (PEAR::isError($prh)) {
Logger::log(" Throwing exception DB_QUERY_FAILED while preparing a query for multiple execution | Message: " . $prh->getMessage() . " | SQL that caused this exception: " . $sql, LOGGER_ERROR);
throw new PAException(DB_QUERY_FAILED, $prh->getMessage());
}
foreach ($args as $params) {
Dal::execute_pre_hooks($sql, $params);
$sth = $db->execute($prh, $params);
Dal::execute_post_hooks($sql, $params);
if (PEAR::isError($sth)) {
Logger::log(" Throwing exception DB_QUERY_FAILED while in multiple query execution | Message: " . $sth->getMessage() . " | SQL that caused this exception: " . $sql, LOGGER_ERROR);
throw new PAException(DB_QUERY_FAILED, $sth->getMessage());
}
$query_count_on_page++;
}
$db->freePrepared($prh);
return TRUE;
}