本文整理汇总了PHP中PdoDataAccess::GetExceptionCount方法的典型用法代码示例。如果您正苦于以下问题:PHP PdoDataAccess::GetExceptionCount方法的具体用法?PHP PdoDataAccess::GetExceptionCount怎么用?PHP PdoDataAccess::GetExceptionCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdoDataAccess
的用法示例。
在下文中一共展示了PdoDataAccess::GetExceptionCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($FacilityID, $ElementID = 0, $DeputyID = "", $ModuleID = "")
{
$db = parent::getPdoObject(config::$db_servers['master']["host"], config::$db_servers['master']["framework_user"], config::$db_servers['master']["framework_pass"], "framework");
if ($DeputyID != "" && $ModuleID != "") {
$this->DeputyID = $DeputyID;
$this->ModuleID = $ModuleID;
$this->ElementID = $ElementID;
} else {
if (!empty($FacilityID)) {
$query = "select * from SystemFacilities where FacilityID=?";
$dt = parent::runquery($query, array($FacilityID), $db);
if (parent::GetExceptionCount() != 0) {
return;
}
if (count($dt) == 0) {
return;
}
$this->DeputyID = $dt[0]["DeputyID"];
$this->ModuleID = $dt[0]["ModuleID"];
$this->ElementID = $ElementID;
} else {
return;
}
}
$this->UserID = $_SESSION["User"]->UserID;
$this->Roles = UserRole::GetUserRole($this->DeputyID, $this->UserID);
if (parent::GetExceptionCount() != 0) {
return;
}
$rolesStr = "-1";
if (count($this->Roles) != 0) {
for ($i = 0; $i < count($this->Roles); $i++) {
$rolesStr .= "," . $this->Roles[$i]->UserRole;
}
}
$query = "select DeputyID,ModuleID,ElementID,\r\n\t\t\t\t\t\tmax(AcInsert) as AcInsert,\r\n\t\t\t\t\t\tmax(AcFullUpdate) as AcFullUpdate,\r\n\t\t\t\t\t\tmax(AcUpdate) as AcUpdate,\r\n\t\t\t\t\t\tmax(AcFullDelete) as AcFullDelete,\r\n\t\t\t\t\t\tmax(AcDelete) as AcDelete\r\n\t\t\t\tfrom ModuleAccess\r\n\t\t\t\twhere (RoleID in({$rolesStr}) OR UserID=:uid)\r\n\t\t\t\t\tAND DeputyID=:did AND ModuleID=:mid AND ElementID=:eid\r\n\t\t\t\tgroup by DeputyID,ModuleID,ElementID";
$dt = parent::runquery($query, array(":uid" => $this->UserID, ":did" => $this->DeputyID, ":mid" => $this->ModuleID, ":eid" => $this->ElementID), $db);
if (parent::GetExceptionCount() != 0 || count($dt) == 0) {
return;
}
$this->AcInsert = $dt[0]["AcInsert"] == 0 ? false : true;
$this->AcFullUpdate = $dt[0]["AcFullUpdate"] == 0 ? false : true;
$this->AcUpdate = $dt[0]["AcUpdate"] == 0 ? false : true;
$this->AcFullDelete = $dt[0]["AcFullDelete"] == 0 ? false : true;
$this->AcDelete = $dt[0]["AcDelete"] == 0 ? false : true;
}
示例2: run
public function run()
{
$pdo = parent::getPdoObject();
$pdo->beginTransaction();
if ($this->payment_type == 1) {
$this->prepare_wheres();
$this->init();
$this->ins_commited_staff();
$this->ins_last_flow_not_fich();
$this->fail_log();
$this->remove_from_limit_staff();
$this->remove_payment_items();
$this->remove_payment_writs();
$this->remove_payments();
$this->remove_temp_subtract_flow();
$this->update_person_dependent_support();
} else {
$this->remove_payment_items($this->payment_type);
$this->remove_payments($this->payment_type);
}
if (parent::GetExceptionCount() > 0) {
print_r(ExceptionHandler::PopAllExceptions());
echo "----";
die;
$pdo->rollBack();
return false;
} else {
$pdo->commit();
return true;
}
}