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


PHP fixQuotes函数代码示例

本文整理汇总了PHP中fixQuotes函数的典型用法代码示例。如果您正苦于以下问题:PHP fixQuotes函数的具体用法?PHP fixQuotes怎么用?PHP fixQuotes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: generateTDHistory

 function generateTDHistory($tdID)
 {
     $td = new TD();
     $td->selectRecord($tdID);
     $afsID = $td->getAfsID();
     //		echo("afsID=$afsID<br>");
     $afs = new AFS();
     $afs->selectRecord($afsID);
     $odID = $afs->getOdID();
     //	echo("odID=$odID<br>");
     $condition = sprintf(" WHERE presentODID='%s' ", fixQuotes($odID));
     $odHistoryRecords = new ODHistoryRecords();
     $odHistoryRecords->selectRecords($condition);
     if (count($odHistoryRecords->arrayList) > 0) {
         //	echo("count>0<br>");
         foreach ($odHistoryRecords->arrayList as $key => $odHistory) {
             $previousODID = $odHistory->getPreviousODID();
             $presentODID = $odHistory->getPresentODID();
             $previousAFS = new AFS();
             $previousAFS->selectRecord($afsID = "", $limit = "", $previousODID);
             $previousAFSID = $previousAFS->getAfsID();
             $previousTD = new TD();
             $previousTD->selectRecord($tdID = "", $previousAFSID);
             $previousTDID = $previousTD->getTdID();
             $this->tdHistory[] = $previousTD;
             $this->generateTDHistory($previousTDID);
         }
     } else {
         //echo("count==0<br>");
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:32,代码来源:tdHistory.php

示例2: selectRecordsForList

 function selectRecordsForList($condition = "")
 {
     //		$sql = sprintf("select * from %s order by tdID desc %s;",TD_TABLE, $condition);
     $sql = "SELECT " . TD_TABLE . ".tdID as tdID, " . TD_TABLE . ".afsID, " . AFS_TABLE . ".odID, " . TD_TABLE . ".taxDeclarationNumber as taxDeclarationNumber, " . "(" . TD_TABLE . ".ceasesWithTheYear - " . TD_TABLE . ".taxBeginsWithTheYear) as year, " . "CONCAT(" . PERSON_TABLE . ".lastName," . PERSON_TABLE . ".firstName," . PERSON_TABLE . ".middleName) as PersonFullName, " . COMPANY_TABLE . ".companyName " . "FROM " . TD_TABLE . " " . "LEFT JOIN " . AFS_TABLE . " " . "ON " . TD_TABLE . ".afsID = " . AFS_TABLE . ".afsID " . "LEFT JOIN " . OWNER_TABLE . " " . "ON " . AFS_TABLE . ".odID = " . OWNER_TABLE . ".odID " . "LEFT JOIN " . OWNER_PERSON_TABLE . " " . "ON " . OWNER_TABLE . ".ownerID = " . OWNER_PERSON_TABLE . ".ownerID " . "LEFT JOIN " . PERSON_TABLE . " " . "ON " . OWNER_PERSON_TABLE . ".personID = " . PERSON_TABLE . ".personID " . "LEFT JOIN " . OWNER_COMPANY_TABLE . " " . "ON " . OWNER_TABLE . ".ownerID = " . OWNER_COMPANY_TABLE . ".ownerID " . "LEFT JOIN " . COMPANY_TABLE . " " . "ON " . OWNER_COMPANY_TABLE . ".companyID = " . COMPANY_TABLE . ".companyID ";
     $sql = $sql . " " . $condition;
     $this->setDB();
     $dummySQL = sprintf("INSERT INTO dummySQL(queryString) VALUES('%s');", fixQuotes($sql));
     $this->db->query($dummySQL);
     $this->db->query($sql);
     while ($this->db->next_record()) {
         $idArray[] = $this->db->f("tdID");
     }
     $idArray = array_unique($idArray);
     foreach ($idArray as $key => $tdID) {
         $td = new TD();
         $td->selectRecord($tdID);
         $this->arrayList[] = $td;
     }
     if (count($this->arrayList) > 0) {
         $this->setDomDocument();
         return true;
     } else {
         return false;
     }
     /*
     $this->setDB();
     		$this->db->query($sql);
     		while ($this->db->next_record()) {
                 $td = new TD;
     			$td->selectRecord($this->db->f("tdID"));
     			$this->arrayList[] = $td;
     		}
     		if(count($this->arrayList) > 0){
     			$this->setDomDocument();
     			return true;
     		}
     		else {
     			return false;
     		}
     */
 }
开发者ID:armic,项目名称:erpts,代码行数:41,代码来源:TDRecords.php

示例3: updateRecord

 function updateRecord()
 {
     if (is_numeric($this->barangay)) {
         $this->barangayID = $this->barangay;
     }
     if (is_numeric($this->district)) {
         $this->districtID = $this->district;
     }
     if (is_numeric($this->municipalityCity)) {
         $this->municipalityCityID = $this->municipalityCity;
     }
     if (is_numeric($this->province)) {
         $this->provinceID = $this->province;
     }
     $sql = sprintf("update %s set " . "number = '%s'" . ", street = '%s'" . ", barangayID = '%s'" . ", district = '%s'" . ", municipalityCity = '%s'" . ", province = '%s'" . " where locationAddressID = %s", LOCATIONADDRESS_TABLE, fixQuotes($this->number), fixQuotes($this->street), fixQuotes($this->barangayID), fixQuotes($this->districtID), fixQuotes($this->municipalityCityID), fixQuotes($this->provinceID), $this->locationAddressID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     $locationAddressID = $this->db->insert_id();
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->locationAddressID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:30,代码来源:LocationAddress.php

示例4: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " penaltyLUT = '%s'" . ", annualDueDate = '%s'" . ", pctRPTax = '%s'" . ", pctSEF = '%s'" . ", pctIdle = '%s'" . ", discountPercentage = '%s'" . ", discountPeriod = '%s'" . ", advancedDiscountPercentage = '%s'" . ", q1AdvancedDiscountPercentage = '%s'" . ";", TREASURY_SETTINGS_TABLE, fixQuotes($this->penaltyLUT), fixQuotes($this->annualDueDate), fixQuotes($this->pctRPTax), fixQuotes($this->pctSEF), fixQuotes($this->pctIdle), fixQuotes($this->discountPercentage), fixQuotes($this->discountPeriod), fixQuotes($this->advancedDiscountPercentage), fixQuotes($this->q1AdvancedDiscountPercentage));
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = true;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:TreasurySettings.php

示例5: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " companyName = '%s'" . ", tin = '%s'" . ", telephone = '%s'" . ", fax = '%s'" . ", email = '%s'" . ", website = '%s'" . " where companyID = '%s'" . ";", COMPANY_TABLE, fixQuotes($this->companyName), fixQuotes($this->tin), fixQuotes($this->telephone), fixQuotes($this->fax), fixQuotes($this->email), fixQuotes($this->website), $this->companyID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         foreach ($this->addressArray as $key => $value) {
             $addressID = $value->updateRecord();
         }
         $ret = $this->companyID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:20,代码来源:Company.php

示例6: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " presentODID = '%s'" . ", previousODID = '%s'" . ", transactionCode = '%s'" . " where odHistoryID = '%s';", ODHISTORY_TABLE, fixQuotes($this->presentODID), fixQuotes($this->previousODID), fixQuotes($this->transactionCode), $this->odHistoryID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->eRPTSSettingsID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:ODHistory.php

示例7: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " code = '%s'" . ", description = '%s'" . ", value = '%s'" . ", status = '%s'" . " where propAssessUsesID = '%s';", PROPASSESSUSES_TABLE, fixQuotes($this->code), fixQuotes($this->description), fixQuotes($this->value), fixQuotes($this->status), $this->propAssessUsesID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->propAssessUsesID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:PropAssessUses.php

示例8: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " personType = '%s'" . ", lastName = '%s'" . ", firstName = '%s'" . ", middleName = '%s'" . ", gender = '%s'" . ", birthday = '%s'" . ", maritalStatus = '%s'" . ", tin = '%s'" . ", telephone = '%s'" . ", mobileNumber = '%s'" . ", email = '%s'" . " where personID = '%s';", PERSON_TABLE, fixQuotes($this->personType), fixQuotes($this->lastName), fixQuotes($this->firstName), fixQuotes($this->middleName), fixQuotes($this->gender), toMysqlDate($this->birthday), fixQuotes($this->maritalStatus), fixQuotes($this->tin), fixQuotes($this->telephone), fixQuotes($this->mobileNumber), fixQuotes($this->email), $this->personID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         foreach ($this->addressArray as $key => $value) {
             //$value = $this->addressArray;
             if ($value->addressID) {
                 $addressID = $value->updateRecord();
             } else {
                 $addressID = $value->insertRecord();
                 $sql = sprintf("insert into %s (" . "personID" . ", addressID" . ")" . " values (%s, %s);", PERSON_ADDRESS_TABLE, $this->personID, $addressID);
                 $this->db->beginTransaction();
                 $this->db->query($sql);
                 if ($this->db->Errno != 0) {
                     $this->db->rollbackTransaction();
                     $this->db->resetErrors();
                     $ret = false;
                 } else {
                     $this->db->endTransaction();
                 }
             }
         }
         $ret = $this->personID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:35,代码来源:Person.php

示例9: archiveRecord

 function archiveRecord($odID, $archiveValue, $userID)
 {
     $sql = sprintf("update %s " . "  set " . "  archive = '%s'" . ", modifiedBy = '%s'" . ", dateModified = '%s'" . " where odID = '%s';", OD_TABLE, fixQuotes($archiveValue), fixQuotes($userID), fixQuotes(time()), fixQuotes($odID));
     $this->setDB();
     //$dummySQL = sprintf("INSERT INTO dummySQL(queryString) VALUES('%s');",fixQuotes($sql));
     //$this->db->query($dummySQL);
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = true;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:18,代码来源:OD.php

示例10: updateStorey

 function updateStorey()
 {
     $sql = sprintf("update %s set " . "improvementsBuildingsID = '%s', floorNumber = '%s', " . "area = '%s', materials = '%s', " . "value = '%s', foundation = '%s', " . "columnsBeams = '%s', trussFraming = '%s', " . "roof = '%s', exteriorWall = '%s', " . "flooring = '%s', doors = '%s', " . "windows = '%s', stairs = '%s', " . "wallFinish = '%s', electrical = '%s', " . "toiletAndBath = '%s', plumbingSewer = '%s', " . "fixtures = '%s'" . "where storeyID = '%s';", STOREY_TABLE, fixQuotes($this->improvementsBuildingsID), fixQuotes($this->floorNumber), fixQuotes($this->area), fixQuotes($this->materials), fixQuotes($this->value), fixQuotes($this->foundation), fixQuotes($this->columnsBeams), fixQuotes($this->trussFraming), fixQuotes($this->roof), fixQuotes($this->exteriorWall), fixQuotes($this->flooring), fixQuotes($this->doors), fixQuotes($this->windows), fixQuotes($this->stairs), fixQuotes($this->wallFinish), fixQuotes($this->electrical), fixQuotes($this->toiletAndBath), fixQuotes($this->plumbingSewer), fixQuotes($this->fixtures), $this->storeyID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->storeyID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:Storey.php

示例11: countSearchRecords

 function countSearchRecords($searchKey, $fields)
 {
     $condition = "where (";
     foreach ($fields as $key => $value) {
         if ($key == 0) {
             $condition = $condition . $value . " like '%" . $searchKey . "%'";
         } else {
             $condition = $condition . " or " . $value . " like '%" . $searchKey . "%' ";
         }
     }
     $sql = "SELECT DISTINCT COUNT(" . RPTOP_TABLE . ".rptopID) as count \r\n                FROM " . RPTOP_TABLE . "\r\n\t\t\t\tLEFT JOIN " . OWNER_TABLE . "\r\n\t\t\t\tON " . RPTOP_TABLE . ".rptopID = " . OWNER_TABLE . ".rptopID\r\n                LEFT JOIN " . OWNER_COMPANY_TABLE . "\r\n                ON " . OWNER_TABLE . ".ownerID = " . OWNER_COMPANY_TABLE . ".ownerID\r\n                LEFT JOIN " . COMPANY_TABLE . "\r\n                ON " . OWNER_COMPANY_TABLE . ".companyID = " . COMPANY_TABLE . ".companyID\r\n                LEFT JOIN " . OWNER_PERSON_TABLE . "\r\n                ON " . OWNER_TABLE . ".ownerID = " . OWNER_PERSON_TABLE . ".ownerID\r\n                LEFT JOIN " . PERSON_TABLE . "\r\n                ON " . OWNER_PERSON_TABLE . ".personID = " . PERSON_TABLE . ".personID\r\n                LEFT JOIN " . RPTOPTD_TABLE . "\r\n                ON " . RPTOP_TABLE . ".rptopID = " . RPTOPTD_TABLE . ".rptopID\r\n                LEFT JOIN " . TD_TABLE . "\r\n                ON " . RPTOPTD_TABLE . ".tdID = " . TD_TABLE . ".tdID ";
     $sql = $sql . $condition . ")" . $limit;
     $this->setDB();
     $dummySql = sprintf("INSERT INTO dummySQL(queryString) VALUES('%s');", fixQuotes($sql));
     $this->db->query($dummySql);
     $this->db->query($sql);
     if ($this->db->next_record()) {
         $ret = $this->db->f("count");
     } else {
         $ret = false;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:23,代码来源:RPTOPRecords.php

示例12: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " userType = '%s'" . ", username = '%s'" . ", password = '%s'" . ", personID = '%s'" . ", dateModified = '%s'" . ", status = '%s'" . " where userID = '%s';", AUTH_USER_MD5_TABLE, fixQuotes($this->userType), fixQuotes($this->username), fixQuotes($this->password), fixQuotes($this->personID), fixQuotes(time()), fixQuotes($this->status), $this->userID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->userID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:User.php

示例13: selectRecords

 function selectRecords($condition = "")
 {
     $sql = "SELECT distinct (" . OD_TABLE . ".odID) as odID\r\n\t\t\t\t  , CONCAT(" . PERSON_TABLE . ".lastName," . PERSON_TABLE . ".firstName," . PERSON_TABLE . ".middleName) as PersonFullName\r\n\t\t\t\t  FROM " . OD_TABLE . "\r\n\t\t\t\t  LEFT JOIN " . LOCATION_TABLE . "\r\n\t\t\t\t  ON " . OD_TABLE . ".odID = " . LOCATION_TABLE . ".odID\r\n\t\t\t\t  LEFT JOIN " . OWNER_TABLE . "\r\n\t\t\t\t  ON " . LOCATION_TABLE . ".odID = " . OWNER_TABLE . ".odID\r\n                  LEFT JOIN " . OWNER_COMPANY_TABLE . "\r\n                  ON " . OWNER_TABLE . ".ownerID = " . OWNER_COMPANY_TABLE . ".ownerID\r\n                  LEFT JOIN " . COMPANY_TABLE . "\r\n                  ON " . OWNER_COMPANY_TABLE . ".companyID = " . COMPANY_TABLE . ".companyID\r\n                  LEFT JOIN " . OWNER_PERSON_TABLE . "\r\n                  ON " . OWNER_TABLE . ".ownerID = " . OWNER_PERSON_TABLE . ".ownerID\r\n                  LEFT JOIN " . PERSON_TABLE . "\r\n                  ON " . OWNER_PERSON_TABLE . ".personID = " . PERSON_TABLE . ".personID\r\n\r\n                  LEFT JOIN " . LOCATIONADDRESS_TABLE . "\r\n                  ON " . LOCATION_TABLE . ".locationAddressID=" . LOCATIONADDRESS_TABLE . ".locationAddressID\r\n\r\n                  LEFT JOIN " . BARANGAY_TABLE . "\r\n                  ON " . BARANGAY_TABLE . ".barangayID=" . LOCATIONADDRESS_TABLE . ".barangayID \r\n\r\n\t\t\t\t  LEFT JOIN " . DISTRICT_TABLE . "\r\n\t\t\t\t  ON " . DISTRICT_TABLE . ".districtID=" . LOCATIONADDRESS_TABLE . ".district \r\n\t\t\t\t  LEFT JOIN " . MUNICIPALITYCITY_TABLE . "\r\n\t\t\t\t  ON " . MUNICIPALITYCITY_TABLE . ".municipalityCityID=" . LOCATIONADDRESS_TABLE . ".municipalityCity \r\n\t\t\t\t  LEFT JOIN " . PROVINCE_TABLE . "\r\n\t\t\t\t  ON " . PROVINCE_TABLE . ".provinceID=" . LOCATIONADDRESS_TABLE . ".province";
     $sql = $sql . $condition;
     $this->setDB();
     $dummySql = sprintf("INSERT INTO dummySQL(queryString) VALUES('%s');", fixQuotes($sql));
     $this->db->query($dummySql);
     $this->db->query($sql);
     while ($this->db->next_record()) {
         $tmpArray[] = $this->db->f("odID");
     }
     if (is_array($tmpArray)) {
         $idArray = array_unique($tmpArray);
         foreach ($idArray as $key => $odID) {
             $od = new OD();
             $od->selectRecord($odID);
             $this->arrayList[] = $od;
         }
     }
     if (count($this->arrayList) > 0) {
         $this->setDomDocument();
         return true;
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:26,代码来源:ODRecords.php

示例14: update

 function update()
 {
     //create a DB object
     $rptsDB = new DB_RPTS();
     // prepare an SQL update statement
     // programming option: it is decided to use direct access to attributes
     //                     when saving and creating the object from database
     $strUpDate = date("Y-m-d H:i:s", time());
     // changed from $this->updateDate
     $sqlupdate = sprintf("update %s set " . "  basic = '%s'" . ", penalty = '%s'" . ", sef = '%s'" . ", idle = '%s'" . ", tdID = '%s'" . ", currentDate = '%s'" . ", paidBasic = '%s'" . ", paidSEF = '%s'" . ", paidPenalty = '%s'" . ", paidIdle = '%s'" . ", paidQuarters = '%s'" . ", paymentMode = '%s'" . ", amnesty = '%s'" . " where dueID = %s", dues, fixQuotes($this->basic), fixQuotes($this->penalty), fixQuotes($this->sef), fixQuotes($this->idle), fixQuotes($this->tdID), fixQuotes($strUpDate), fixQuotes($this->paidBasic), fixQuotes($this->paidSEF), fixQuotes($this->paidPenalty), fixQuotes($this->paidIdle), fixQuotes($this->paidQuarters), fixQuotes($this->paymentMode), $this->amnesty, $this->dueID);
     //query the database
     //echo("$sqlupdate<br>");
     $queryID = $rptsDB->query($sqlupdate);
     if ($queryID) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:19,代码来源:_dues.php

示例15: updateRecord

 function updateRecord()
 {
     $sql = sprintf("update %s set" . " code = '%s'" . ", reportCode = '%s'" . ", description = '%s'" . ", rangeLowerBound = '%s'" . ", rangeUpperBound = '%s'" . ", value = '%s'" . ", status = '%s'" . " where improvementsBuildingsActualUsesID = '%s';", IMPROVEMENTSBUILDINGS_ACTUALUSES_TABLE, fixQuotes($this->code), fixQuotes($this->reportCode), fixQuotes($this->description), fixQuotes($this->rangeLowerBound), fixQuotes($this->rangeUpperBound), fixQuotes($this->value), fixQuotes($this->status), $this->improvementsBuildingsActualUsesID);
     //echo $sql;
     $this->setDB();
     $this->db->beginTransaction();
     $this->db->query($sql);
     if ($this->db->Errno != 0) {
         $this->db->rollbackTransaction();
         $this->db->resetErrors();
         $ret = false;
     } else {
         $this->db->endTransaction();
         $ret = $this->improvementsBuildingsActualUsesID;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:17,代码来源:ImprovementsBuildingsActualUses.php


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