本文整理汇总了PHP中PdoDataAccess::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP PdoDataAccess::delete方法的具体用法?PHP PdoDataAccess::delete怎么用?PHP PdoDataAccess::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdoDataAccess
的用法示例。
在下文中一共展示了PdoDataAccess::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemoveDependency
static function RemoveDependency($PersonID, $row_no)
{
$whereParams = array();
$whereParams[":pid"] = $PersonID;
$whereParams[":rowid"] = $row_no;
if (parent::delete("HRM_person_dependents", " PersonID=:pid and row_no=:rowid", $whereParams) === false) {
$error = implode("", parent::popExceptionDescription());
if (strpos($error, "a foreign key constraint fails") !== false) {
if (strpos($error, "person_dependent_supports") !== false) {
parent::PushException("این وابسته دارای سابقه کفالت بوده و قابل حذف نمی باشد.");
} else {
parent::PushException("از این وابسته در جای دیگری استفاده شده و قابل حدف نمی باشد.");
}
} else {
parent::PushException($error);
}
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $row_no;
$daObj->RelatedPersonType = 3;
$daObj->RelatedPersonID = $PersonID;
$daObj->TableName = "person_dependents";
$daObj->execute();
return true;
}
示例2: Remove
function Remove()
{
if ($this->list_type == 9) {
$tblName = "mission_list_items";
} else {
$tblName = "pay_get_list_items";
}
$query = " select * from " . $tblName . " where list_id = " . $this->list_id;
$tmp = parent::runquery($query);
$query = " select * from pay_get_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
$tmp2 = parent::runquery($query);
if (count($tmp) > 0) {
parent::PushException("این لیست شامل مجموعه ای از افراد می باشد .");
return false;
} else {
if (count($tmp2) > 0) {
parent::PushException("این لیست تایید واحد مرکزی می باشد .");
return false;
} else {
$result = parent::delete("pay_get_lists", "list_id=?", array($this->list_id));
}
}
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $this->list_id;
$daObj->TableName = "pay_get_lists";
$daObj->execute();
return true;
}
示例3: Remove
function Remove($All = "")
{
$query = " select * from evaluation_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
$tmp2 = parent::runquery($query);
if (count($tmp2) > 0) {
parent::PushException("این لیست تایید واحد مرکزی می باشد .");
return false;
} else {
if ($All == "true") {
$result = parent::delete("evaluation_list_items", "list_id=?", array($this->list_id));
} else {
$result = parent::delete("evaluation_list_items", "list_id =? and ListItemID=? ", array($this->list_id, $this->ListItemID));
}
}
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $this->list_id;
$daObj->SubObjectID = $this->ListItemID;
$daObj->TableName = "evaluation_list_items";
$daObj->execute();
return true;
}
示例4: RemoveFlow
static function RemoveFlow($FlowID)
{
if (!parent::delete("WFM_flows", " FlowID=?", array($FlowID))) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $FlowID;
$daObj->TableName = "WFM_flows";
$daObj->execute();
return true;
}
示例5: DeleteLoan
static function DeleteLoan($LoanID)
{
if (parent::delete("LON_loans", " LoanID=?", array($LoanID)) === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $LoanID;
$daObj->TableName = "LON_loans";
$daObj->execute();
return true;
}
示例6: Remove
static function Remove($sid)
{
$result = parent::delete("SalaryItemReport", "SalaryItemReportID=:SID ", array(":SID" => $sid));
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $sid;
$daObj->TableName = "SalaryItemReport";
$daObj->execute();
return true;
}
示例7: Remove
static function Remove($sid, $pt, $cid)
{
$result = parent::delete("CostCenterException", "SalaryItemTypeID=:SID and PersonType = :PT and CostCenterID = :CC ", array(":SID" => $sid, ":PT" => $pt, ":CC" => $cid));
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $sid;
$daObj->SubObjectID = $cid;
$daObj->TableName = "CostCenterException";
$daObj->execute();
return true;
}
示例8: RemoveTaxItem
function RemoveTaxItem($tax_table_id, $row_no)
{
$result = parent::delete("tax_table_items", "tax_table_id=:tid and row_no=:rid", array(":tid" => $this->tax_table_id, ":rid" => $this->row_no));
if ($result === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_add;
$daObj->MainObjectID = $this->tax_table_id;
$daObj->SubObjectID = $this->row_no;
$daObj->TableName = "tax_table_items";
$daObj->execute();
return true;
}
示例9: Remove
static function Remove($sid, $pt)
{
$result = parent::delete("SubtractItemInfo", "SalaryItemTypeID=:SID and PersonType = :PT ", array(":SID" => $sid, ":PT" => $pt));
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $sid;
$daObj->SubObjectID = $pt;
$daObj->TableName = "SubtractItemInfo";
$daObj->execute();
return true;
}
示例10: Remove
function Remove()
{
$result = parent::delete("HRM_person_dependent_supports", "PersonID=:pid and master_row_no=:mrno and row_no=:rno", array(":pid" => $this->PersonID, ":mrno" => $this->master_row_no, ":rno" => $this->row_no));
if ($result === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->RelatedPersonID = $this->PersonID;
$daObj->RelatedPersonType = 3;
$daObj->MainObjectID = $this->row_no;
$daObj->TableName = "person_dependent_supports";
$daObj->execute();
return true;
}
示例11: RemoveTax
function RemoveTax()
{
if (!$this->onBeforeDelete()) {
return false;
}
$result = parent::delete("tax_tables", "tax_table_id=:tid ", array(":tid" => $this->tax_table_id));
if ($result === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_add;
$daObj->MainObjectID = $this->tax_table_id;
$daObj->TableName = "tax_tables";
$daObj->execute();
return true;
}
示例12: RemoveJobHistory
static function RemoveJobHistory($PersonID, $row_no)
{
$whereParams = array();
$whereParams[":pid"] = $PersonID;
$whereParams[":rowid"] = $row_no;
if (PdoDataAccess::delete("PersonJobs", " PersonID=:pid and RowNO=:rowid", $whereParams) === false) {
parent::PushException(ER_PERSON_DEP_DEL);
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->RelatedPersonID = $PersonID;
$daObj->MainObjectID = $row_no;
$daObj->TableName = "PersonJobs";
$daObj->execute();
return true;
}
示例13: RemoveTax
function RemoveTax($tax_table_type_id, $person_type)
{
if (!$this->onBeforeDelete()) {
return false;
}
$result = parent::delete("tax_table_types", "tax_table_type_id=:tid and person_type = :pt ", array(":tid" => $this->tax_table_type_id, ":pt" => $this->person_type));
if ($result === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->RelatedPersonType = DataAudit::PersonType_staff;
$daObj->MainObjectID = $this->tax_table_type_id;
$daObj->TableName = "tax_table_types";
$daObj->execute();
return true;
}
示例14: RemoveParam
function RemoveParam($param_type, $person_type)
{
$obj = new manage_salary_param_types($param_type, $person_type);
if (!$obj->onBeforeDelete()) {
return false;
}
$result = parent::delete("salary_param_types", "param_type=:pid and person_type = :pt ", array(":pid" => $this->param_type, ":pt" => $this->person_type));
if ($result === false) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->RelatedPersonType = DataAudit::PersonType_staff;
$daObj->MainObjectID = $this->param_type;
$daObj->TableName = "salary_param_types";
$daObj->execute();
return true;
}
示例15: Remove
static function Remove($pid)
{
$res = parent::runquery(" select count(*) cn from SubtractItemInfo where arrangement = " . $pid);
if ($res[0]['cn'] > 0) {
parent::PushException("حذف این رکورد امکان پذیر نمی باشد.");
return false;
}
$result = parent::delete("priority", "PriorityID=:PID ", array(":PID" => $pid));
if (!$result) {
return false;
}
$daObj = new DataAudit();
$daObj->ActionType = DataAudit::Action_delete;
$daObj->MainObjectID = $pid;
$daObj->TableName = "priority";
$daObj->execute();
return true;
}