当前位置: 首页>>代码示例>>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;未经允许,请勿转载。