本文整理汇总了PHP中Owner::selectRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP Owner::selectRecord方法的具体用法?PHP Owner::selectRecord怎么用?PHP Owner::selectRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Owner
的用法示例。
在下文中一共展示了Owner::selectRecord方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectRecordForList
function selectRecordForList($rptopID)
{
if ($rptopID == "") {
return;
}
$this->setDB();
$sql = sprintf("SELECT * FROM %s WHERE rptopID=%s;", RPTOP_TABLE, $rptopID);
$this->db->query($sql);
//echo $sql;
$rptop = new RPTOP();
if ($this->db->next_record()) {
foreach ($this->db->Record as $key => $value) {
switch ($key) {
default:
$this->{$key} = $value;
}
}
///*
$sql = sprintf("SELECT ownerID FROM %s WHERE rptopID = %s;", OWNER_TABLE, $rptopID);
$this->db->query($sql);
//echo $sql;
while ($this->db->next_record()) {
$owner = new Owner();
//echo test;
$owner->selectRecord($this->db->f("ownerID"));
$this->owner = $owner;
}
/*
$sql = sprintf("SELECT * FROM %s WHERE rptopID=%s;",
RPTOPTD_TABLE, $rptopID);
$this->setDB();
//echo $sql;
//*
$this->db->query($sql);
while ($this->db->next_record()) {
$td = new TD;
$td->selectRecord($this->db->f("tdID"));
$this->tdArray[] = $td;
}
$this->setDomDocument();
//*/
/*
$tdRecords = new TDRecords;
$tdRecords->selectRecords($this->rptopID);
$this->tdArray = $tdRecords->getArrayList();
//*/
$this->setDomDocument();
$ret = true;
} else {
$ret = false;
}
return $ret;
}
示例2: selectRecord
function selectRecord($odID)
{
if ($odID == "") {
return;
}
$this->setDB();
$sql = sprintf("SELECT * FROM %s WHERE odID=%s;", OD_TABLE, $odID);
$this->db->query($sql);
if ($this->db->next_record()) {
$this->setOdID($this->db->f("odID"));
$this->setLandArea($this->db->f("landArea"));
$this->setHouseTagNumber($this->db->f("houseTagNumber"));
$this->setLotNumber($this->db->f("lotNumber"));
$this->setZoneNumber($this->db->f("zoneNumber"));
$this->setBlockNumber($this->db->f("blockNumber"));
$this->setPsd13($this->db->f("psd13"));
$this->setAffidavitOfOwnership($this->db->f("affidavitOfOwnership"));
$this->setBarangayCertificate($this->db->f("barangayCertificate"));
$this->setLandTagging($this->db->f("landTagging"));
$this->setDateCreated($this->db->f("dateCreated"));
$this->setCreatedBy($this->db->f("createdBy"));
$this->setDateModified($this->db->f("dateModified"));
$this->setModifiedBy($this->db->f("modifiedBy"));
$this->setArchive($this->db->f("archive"));
$this->setTransactionCode($this->db->f("transactionCode"));
$sql = sprintf("SELECT ownerID FROM %s WHERE odID = %s;", OWNER_TABLE, $this->odID);
$this->db->query($sql);
while ($this->db->next_record()) {
$owner = new Owner();
$owner->selectRecord($this->db->f("ownerID"));
$this->owner = $owner;
}
$sql = sprintf("SELECT locationAddressID FROM %s WHERE odID = %s;", LOCATION_TABLE, $this->odID);
$this->db->query($sql);
while ($this->db->next_record()) {
$locationAddress = new LocationAddress();
$locationAddress->selectRecord($this->db->f("locationAddressID"));
$this->locationAddress = $locationAddress;
}
$sql = sprintf("SELECT previousOdID FROM %s WHERE presentOdID = %s;", ODHISTORY_TABLE, $this->odID);
$this->db->query($sql);
while ($this->db->next_record()) {
$this->oldODArray[] = $this->db->f("previousOdID");
}
$this->setDomDocument();
return true;
} else {
return false;
}
}
示例3: addOwnerCompanyRPTOP
function addOwnerCompanyRPTOP($rptopID, $ownerID, $companyIDArray)
{
$owner = new Owner();
$owner->selectRecord($ownerID);
$ctr = 0;
foreach ($companyIDArray as $key => $value) {
$owner->deleteOwnerCompany($value);
$owner->insertOwnerCompany($ownerID, $value);
$rptop = new RPTOP();
$rptop->selectRecordForList($rptopID);
$year = $rptop->getTaxableYear();
$tdIDArray = $this->getTDListOf($value, "Company", $year);
foreach ($tdIDArray as $tdKey => $tdValue) {
//echo $tdValue."<br>";
$rptop->insertRptopTd($rptopID, $tdValue);
$ctr++;
}
unset($rptop);
}
unset($owner);
$ret = $ctr;
return $ret;
}
示例4: OD
function CreateNewRPU_AFS_TD($odID, $userID = "", $transactionCode = "", $copyOwner = true, $copyAFS = true, $copyTD = false)
{
$od = new OD();
$od->selectRecord($odID);
unset($od->oldODArray);
$od->setTransactionCode($transactionCode);
$od->setOldODArray($odID);
// create new OD
$ownerID = $od->owner->getOwnerID();
$newOdID = $od->insertRecord();
$newOwnerID = $od->newOwnerID;
$od->setDomDocument();
// associate existing Owner to new OD
$owner = new Owner();
$owner->selectRecord($ownerID);
if (count($owner->personArray)) {
foreach ($owner->personArray as $personKey => $personValue) {
if ($copyOwner) {
$owner->insertOwnerPerson($newOwnerID, $personValue->getPersonID());
}
}
}
if (count($owner->companyArray)) {
foreach ($owner->companyArray as $companyKey => $companyValue) {
if ($copyOwner) {
$owner->insertOwnerCompany($newOwnerID, $companyValue->getCompanyID());
}
}
}
// create new AFS and associate existing properties to new AFS
$afs = new AFS();
$afsID = $afs->checkAfsID($odID);
$afs->selectRecord($afsID);
$afs->setOdID($newOdID);
$afs->effectivity = date("Y") + 1;
// new arpNumber is blank
$afs->arpNumber = "";
// retain PIN except for Consolidation and Subdivision
if ($transactionCode == "SD" || $transactionCode == "CS") {
$afs->propertyIndexNumber = "";
}
$afs->setDomDocument();
if ($copyAFS) {
$newAfsID = $afs->insertRecord();
if (count($afs->landArray)) {
foreach ($afs->landArray as $landKey => $landValue) {
$landValue->setPropertyID("");
$landValue->setAfsID($newAfsID);
if (is_object($landValue->propertyAdministrator)) {
$landValue->propertyAdministrator->setPersonID("");
} else {
$landValue->propertyAdministrator = new Person();
$landValue->propertyAdministrator->setPersonID("");
}
// set unitValue from SubClass
$landSubclasses = new LandSubclasses();
$landSubclasses->selectRecord(intVal($landValue->subClass));
$landValue->setUnitValue($landSubclasses->getValue());
// set assessmentLevel from ActualUse
$landActualUses = new LandActualUses();
$landActualUses->selectRecord(intVal($landValue->actualUse));
$landValue->setAssessmentLevel($landActualUses->getValue());
$landValue->calculateMarketValue();
$landValue->calculateValueAdjustment();
$landValue->calculateAdjustedMarketValue();
$landValue->calculateAssessedValue();
$newP = $landValue->insertRecord();
}
}
if (count($afs->plantsTreesArray)) {
foreach ($afs->plantsTreesArray as $plantsTreesKey => $plantsTreesValue) {
$plantsTreesValue->setPropertyID("");
$plantsTreesValue->setAfsID($newAfsID);
if (is_object($plantsTreesValue->propertyAdministrator)) {
$plantsTreesValue->propertyAdministrator->setPersonID("");
} else {
$plantsTreesValue->propertyAdministrator = new Person();
$plantsTreesValue->propertyAdministrator->setPersonID("");
}
// set unitPrice from ProductClass
$plantsTreesClasses = new PlantsTreesClasses();
$plantsTreesClasses->selectRecord(intVal($plantsTreesValue->productClass));
$plantsTreesValue->setUnitPrice($plantsTreesClasses->getValue());
// set assessmentLevel from ActualUse
$plantsTreesActualUses = new PlantsTreesActualUses();
$plantsTreesActualUses->selectRecord(intVal($plantsTreesValue->actualUse));
$plantsTreesValue->setAssessmentLevel($plantsTreesActualUses->getValue());
$plantsTreesValue->calculateMarketValue();
$plantsTreesValue->calculateValueAdjustment();
$plantsTreesValue->calculateAdjustedMarketValue();
$plantsTreesValue->calculateAssessedValue();
$newP = $plantsTreesValue->insertRecord();
}
}
if (count($afs->improvementsBuildingsArray)) {
foreach ($afs->improvementsBuildingsArray as $improvementsBuildingsKey => $improvementsBuildingsValue) {
$improvementsBuildingsValue->setPropertyID("");
$improvementsBuildingsValue->setAfsID($newAfsID);
if (is_object($improvementsBuildingsValue->propertyAdministrator)) {
$improvementsBuildingsValue->propertyAdministrator->setPersonID("");
//.........这里部分代码省略.........
示例5: selectRecords
function selectRecords($condition = "")
{
$sql = sprintf("select * from %s %s;", OWNER_TABLE, $condition);
$this->setDB();
$this->db->query($sql);
while ($this->db->next_record()) {
$owner = new Owner();
$owner->selectRecord($this->db->f("ownerID"));
$this->arrayList[] = $owner;
}
if (count($this->arrayList) > 0) {
$this->setDomDocument();
$ret = true;
} else {
$ret = false;
}
return $ret;
}
示例6: while
function CreateNewRPU_AFS_TDGenRevBrgy($odID, $userID = "", $transactionCode = "", $copyOwner = true, $copyAFS = true, $copyTD = true)
{
$link = mysql_connect(MYSQLDBHOST, MYSQLDBUSER, MYSQLDBPWD);
mysql_select_db(MYSQLDBNAME, $link);
$sql = "select Person.firstName, Person.lastName from Person, Owner, OwnerPerson " . "where Person.personID = OwnerPerson.personID and OwnerPerson.ownerID = Owner.ownerID and Owner.odID = " . $odID;
$rs = mysql_query($sql, $link);
$prevowners = '';
while ($row = mysql_fetch_assoc($rs)) {
$prevowners .= $row['firstName'] . ' ' . $row['lastName'] . ', ';
}
$prevowners = substr($prevowners, 0, strlen($prevowners) - 2);
$sql = "select AFS.totalAssessedValue from AFS where AFS.odID = " . $odID;
$rs = mysql_query($sql, $link);
$prevassdval = 0;
if ($row = mysql_fetch_assoc($rs)) {
$prevassdval = $row['totalAssessedValue'];
}
$od = new OD();
$od->selectRecord($odID);
unset($od->oldODArray);
$od->setTransactionCode($transactionCode);
$od->setOldODArray($odID);
// create new OD
$ownerID = $od->owner->getOwnerID();
$newOdID = $od->insertRecord();
$newOwnerID = $od->newOwnerID;
$od->setDomDocument();
// associate existing Owner to new OD
$owner = new Owner();
$owner->selectRecord($ownerID);
if (count($owner->personArray)) {
foreach ($owner->personArray as $personKey => $personValue) {
if ($copyOwner) {
$owner->insertOwnerPerson($newOwnerID, $personValue->getPersonID());
}
}
}
if (count($owner->companyArray)) {
foreach ($owner->companyArray as $companyKey => $companyValue) {
if ($copyOwner) {
$owner->insertOwnerCompany($newOwnerID, $companyValue->getCompanyID());
}
}
}
// create new AFS and associate existing properties to new AFS
$afs = new AFS();
$afsID = $afs->checkAfsID($odID);
$afs->selectRecord($afsID);
$afs->setOdID($newOdID);
$afs->effectivity = date("Y") + 1;
// new arpNumber is blank
//$afs->arpNumber = "";
// retain PIN except for Consolidation and Subdivision
//if($transactionCode=="SD" || $transactionCode=="CS"){
$afs->propertyIndexNumber = "";
//}
$afs->setDomDocument();
$newAFSID = $afs->insertRecord();
$afs->arpNumber = '(' . $newAFSID . ')';
$afs->updateRecord();
if ($copyAFS) {
if ($copyTD) {
$td = new TD();
$td->taxDeclarationNumber = $afs->arpNumber;
$td->afsID = $newAFSID;
$td->previousOwner = $prevowners;
$td->previousAssessedValue = $prevassdval;
$td->setDomDocument();
$newTDID = $td->insertRecord();
}
if (count($afs->landArray)) {
foreach ($afs->landArray as $landKey => $landValue) {
$landValue->setPropertyID("");
$landValue->setAfsID($newAFSID);
$landValue->propertyAdministrator->setPersonID("");
// set unitValue from SubClass
$landSubclasses = new LandSubclasses();
$landSubclasses->selectRecord(intVal($landValue->subClass));
$landValue->setUnitValue($landSubclasses->getValue());
// set assessmentLevel from ActualUse
$landActualUses = new LandActualUses();
$landActualUses->selectRecord(intVal($landValue->actualUse));
$landValue->setAssessmentLevel($landActualUses->getValue());
$landValue->calculateMarketValue();
$landValue->calculateValueAdjustment();
$landValue->calculateAdjustedMarketValue();
$landValue->calculateAssessedValue();
$landValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
$landValue->appraisedByDate = "";
$landValue->recommendingApprovalDate = "";
$landValue->approvedByDate = "";
$newP = $landValue->insertRecord();
}
}
if (count($afs->plantsTreesArray)) {
foreach ($afs->plantsTreesArray as $plantsTreesKey => $plantsTreesValue) {
$plantsTreesValue->setPropertyID("");
$plantsTreesValue->setAfsID($newAFSID);
$plantsTreesValue->propertyAdministrator->setPersonID("");
// set unitPrice from ProductClass
//.........这里部分代码省略.........