本文整理汇总了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;
}
示例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;
}