當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Owner::insertRecord方法代碼示例

本文整理匯總了PHP中Owner::insertRecord方法的典型用法代碼示例。如果您正苦於以下問題:PHP Owner::insertRecord方法的具體用法?PHP Owner::insertRecord怎麽用?PHP Owner::insertRecord使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Owner的用法示例。


在下文中一共展示了Owner::insertRecord方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: insertRecord

 function insertRecord()
 {
     $sql = sprintf("insert into %s (" . " rptopNumber" . ", rptopDate" . ", taxableYear" . ", cityTreasurer" . ", cityAssessor" . ", dateCreated" . ", createdBy" . ", dateModified" . ", modifiedBy" . ", archive" . ") " . "values (" . "  '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'" . ");", RPTOP_TABLE, fixQuotes($this->rptopNumber), fixQuotes($this->rptopDate), fixQuotes($this->taxableYear), fixQuotes($this->cityTreasurer), fixQuotes($this->cityAssessor), fixQuotes(time()), fixQuotes($this->createdBy), fixQuotes(time()), fixQuotes($this->modifiedBy), fixQuotes($this->archive));
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     $rptopID = $this->db->insert_id();
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $owner = new Owner();
         $owner->insertRecord($rptopID, "rptop");
         $this->db->endTransaction();
         $ret = $rptopID;
     }
     return $ret;
 }
開發者ID:armic,項目名稱:erpts,代碼行數:20,代碼來源:RPTOP.php

示例2: insertRecord

 function insertRecord()
 {
     $sql = sprintf("insert into %s (" . " landArea" . ", houseTagNumber" . ", lotNumber" . ", zoneNumber" . ", blockNumber" . ", psd13" . ", affidavitOfOwnership" . ", barangayCertificate" . ", landTagging" . ", dateCreated" . ", createdBy" . ", dateModified" . ", modifiedBy" . ", archive" . ", transactionCode" . ") values ('%s','%s','%s','%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');", OD_TABLE, fixQuotes($this->landArea), fixQuotes($this->houseTagNumber), fixQuotes($this->lotNumber), fixQuotes($this->zoneNumber), fixQuotes($this->blockNumber), fixQuotes($this->psd13), fixQuotes($this->affidavitOfOwnership), fixQuotes($this->barangayCertificate), fixQuotes($this->landTagging), fixQuotes(time()), fixQuotes($this->createdBy), fixQuotes(time()), fixQuotes($this->modifiedBy), fixQuotes($this->archive), fixQuotes($this->transactionCode));
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     $odID = $this->db->insert_id();
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $owner = new Owner();
         $this->newOwnerID = $owner->insertRecord($odID, "od");
         if (is_a($this->locationAddress, LocationAddress)) {
             $locationAddressID = $this->locationAddress->insertRecord();
             $sql = sprintf("insert into %s (" . "odID" . ", locationAddressID" . ") values ('%s', '%s');", LOCATION_TABLE, fixQuotes($odID), fixQuotes($locationAddressID));
             $this->db->beginTransaction();
             $this->db->query($sql);
             $locationID = $this->db->insert_id();
             if ($this->db->Errno != 0) {
                 $this->db->rollbackTransaction();
                 $this->db->resetErrors();
                 $ret = false;
             } else {
                 $this->db->endTransaction();
             }
         }
         foreach ($this->oldODArray as $key => $value) {
             $sql = sprintf("insert into %s (" . "previousOdID" . ", presentOdID" . ", transactionCode" . ") values ('%s', '%s', '%s');", ODHISTORY_TABLE, fixQuotes($value), fixQuotes($odID), fixQuotes($this->transactionCode));
             $this->db->beginTransaction();
             $this->db->query($sql);
             $locationID = $this->db->insert_id();
             if ($this->db->Errno != 0) {
                 $this->db->rollbackTransaction();
                 $this->db->resetErrors();
                 $ret = false;
             } else {
                 $this->db->endTransaction();
             }
         }
         $ret = $odID;
     }
     return $ret;
 }
開發者ID:armic,項目名稱:erpts,代碼行數:46,代碼來源:OD.php


注:本文中的Owner::insertRecord方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。