当前位置: 首页>>代码示例>>PHP>>正文


PHP History::storeHistoryDeleted方法代码示例

本文整理汇总了PHP中History::storeHistoryDeleted方法的典型用法代码示例。如果您正苦于以下问题:PHP History::storeHistoryDeleted方法的具体用法?PHP History::storeHistoryDeleted怎么用?PHP History::storeHistoryDeleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在History的用法示例。


在下文中一共展示了History::storeHistoryDeleted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 /**
  * Removes a contact and all associated records from the system.
  *
  * @param integer contact ID
  * @return void
  */
 public function delete($contactID)
 {
     $sql = sprintf("DELETE FROM\n                contact\n            WHERE\n                contact_id = %s\n            AND\n                site_id = %s", $this->_db->makeQueryInteger($contactID), $this->_siteID);
     $this->_db->query($sql);
     $sql = sprintf("UPDATE\n                contact\n            SET\n                reports_to = -1\n            WHERE\n                reports_to = %s\n            AND\n                site_id = %s", $this->_db->makeQueryInteger($contactID), $this->_siteID);
     $this->_db->query($sql);
     /* Delete from saved lists. */
     $sql = sprintf("DELETE FROM\n                saved_list_entry\n            WHERE\n                data_item_id = %s\n            AND\n                site_id = %s\n            AND\n                data_item_type = %s", $this->_db->makeQueryInteger($contactID), $this->_siteID, DATA_ITEM_CONTACT);
     $this->_db->query($sql);
     /* Delete extra fields. */
     $this->extraFields->deleteValueByDataItemID($contactID);
     $history = new History($this->_siteID);
     $history->storeHistoryDeleted(DATA_ITEM_CONTACT, $contactID);
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:20,代码来源:Contacts.php

示例2: delete

 /**
  * Removes a candidate and all associated records from the system.
  *
  * @param integer Candidate ID to delete.
  * @return void
  */
 public function delete($candidateID)
 {
     /* Delete the candidate from candidate. */
     $sql = sprintf("DELETE FROM\n                candidate\n            WHERE\n                candidate_id = %s\n            AND\n                site_id = %s", $this->_db->makeQueryInteger($candidateID), $this->_siteID);
     $this->_db->query($sql);
     $history = new History($this->_siteID);
     $history->storeHistoryDeleted(DATA_ITEM_CANDIDATE, $candidateID);
     /* Delete pipeline entries from candidate_joborder. */
     $sql = sprintf("DELETE FROM\n                candidate_joborder\n            WHERE\n                candidate_id = %s\n            AND\n                site_id = %s", $this->_db->makeQueryInteger($candidateID), $this->_siteID);
     $this->_db->query($sql);
     /* Delete pipeline history from candidate_joborder_status_history. */
     $sql = sprintf("DELETE FROM\n                candidate_joborder_status_history\n            WHERE\n                candidate_id = %s\n            AND\n                site_id = %s", $this->_db->makeQueryInteger($candidateID), $this->_siteID);
     $this->_db->query($sql);
     /* Delete from saved lists. */
     $sql = sprintf("DELETE FROM\n                saved_list_entry\n            WHERE\n                data_item_id = %s\n            AND\n                site_id = %s\n            AND\n                data_item_type = %s", $this->_db->makeQueryInteger($candidateID), $this->_siteID, DATA_ITEM_CANDIDATE);
     $this->_db->query($sql);
     /* Delete attachments. */
     $attachments = new Attachments($this->_siteID);
     $attachmentsRS = $attachments->getAll(DATA_ITEM_CANDIDATE, $candidateID);
     foreach ($attachmentsRS as $rowNumber => $row) {
         $attachments->delete($row['attachmentID']);
     }
     /* Delete extra fields. */
     $this->extraFields->deleteValueByDataItemID($candidateID);
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:31,代码来源:Candidates.php

示例3: delete

 /**
  * Removes a company and all associated records from the system.
  *
  * @param integer Company ID
  * @return void
  */
 public function delete($companyID)
 {
     /* Delete the company. */
     $sql = sprintf("DELETE FROM\n                company\n            WHERE\n                company_id = %s\n            AND\n                site_id = %s", $companyID, $this->_siteID);
     $this->_db->query($sql);
     $history = new History($this->_siteID);
     $history->storeHistoryDeleted(DATA_ITEM_COMPANY, $companyID);
     /* Find associated contacts. */
     $sql = sprintf("SELECT\n                contact_id AS contactID\n            FROM\n                contact\n            WHERE\n                company_id = %s\n            AND\n                site_id = %s", $companyID, $this->_siteID);
     $contactsRS = $this->_db->getAllAssoc($sql);
     /* Find associated job orders. */
     $sql = sprintf("SELECT\n                joborder_id AS jobOrderID\n            FROM\n                joborder\n            WHERE\n                company_id = %s\n            AND\n                site_id = %s", $companyID, $this->_siteID);
     $jobOrdersRS = $this->_db->getAllAssoc($sql);
     /* Find associated attachments. */
     $attachments = new Attachments($this->_siteID);
     $attachmentsRS = $attachments->getAll(DATA_ITEM_COMPANY, $companyID);
     /* Delete associated contacts. */
     $contacts = new Contacts($this->_siteID);
     foreach ($contactsRS as $rowIndex => $row) {
         $contacts->delete($row['contactID']);
     }
     /* Delete associated job orders. */
     $jobOrders = new JobOrders($this->_siteID);
     foreach ($jobOrdersRS as $rowIndex => $row) {
         $jobOrders->delete($row['jobOrderID']);
     }
     /* Delete associated attachments. */
     foreach ($attachmentsRS as $rowNumber => $row) {
         $attachments->delete($row['attachmentID']);
     }
     /* Delete from saved lists. */
     $sql = sprintf("DELETE FROM\n                saved_list_entry\n            WHERE\n                data_item_id = %s\n            AND\n                site_id = %s\n            AND\n                data_item_type = %s", $this->_db->makeQueryInteger($companyID), $this->_siteID, DATA_ITEM_COMPANY);
     $this->_db->query($sql);
     /* Delete extra fields. */
     $this->extraFields->deleteValueByDataItemID($companyID);
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:42,代码来源:Companies.php


注:本文中的History::storeHistoryDeleted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。