• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_db_error函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: delete

 function delete($sign_id)
 {
     $strWhere[SIGN_ID] = $sign_id;
     $strValues[] = "count(*) as cnt";
     // check if owner have existing transactions
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_SIGNATORIES_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:11,代码来源:eBPLS.Signatories.class.php


示例2: selectNonSystemData

 function selectNonSystemData($formula_id = NULL, $formula_desc = NULL, $formula_type = NULL, $system_data = NULL, $page = 1, $maxrec = 20, $orderby = EBPLS_FORMULAS_CREATE_TS, $is_desc = false)
 {
     if ($formula_id != NULL && $formula_id != "") {
         $strWhere[EBPLS_FORMULAS_FORMULA_ID] = $formula_id;
     }
     if ($formula_desc != NULL && $formula_desc != "") {
         $strWhere[EBPLS_FORMULAS_FORMULA_DESC] = array("like", "{$formula_desc}%");
     }
     if ($formula_type != NULL && $formula_type != "") {
         $strWhere[EBPLS_FORMULAS_FORMULA_TYPE] = $formula_type;
     }
     if (!is_null($system_data) && ($system_data == "0" || $system_data == "1")) {
         $strWhere[EBPLS_FORMULAS_SYSTEMDATA] = $system_data;
     }
     // select all columns
     $strValues[] = "*";
     if ($orderby != NULL) {
         $strOrder[$orderby] = $orderby;
     } else {
         $strOrder[$orderkey] = EBPLS_FORMULAS_FORMULA_ID;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_FORMULAS_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLTaxFeeSysRef object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new TaxFeeFormula($this->m_dbLink, false);
             $obj = unserialize($result["result"][$i][EBPLS_FORMULAS_FORMULA_CLASS]);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:36,代码来源:ebpls.taxfeeformula.class.php


示例3: assignPermitCode

 function assignPermitCode($code)
 {
     $strValues[FRANCHISE_PERMIT_CODE] = $code;
     $strWhere[FRANCHISE_PERMIT_ID] = $this->data_elems[FRANCHISE_PERMIT_ID];
     $ret = ebpls_update_data($this->m_dbLink, EBPLS_FRANCHISE_PERMIT_TABLE, $strValues, $strWhere);
     if ($ret < 0) {
         $this->setError($ret, $str = get_db_error());
         $this->debug("UPDATE FRA PERMIT FAILED [error:{$ret},msg=" . $str . "]");
         return $ret;
     } else {
         $this->debug("UPDATE FRA PERMIT SUCCESSFULL [{$ret}]");
         return $ret;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:14,代码来源:ebpls.franchise.permit.class.php


示例4: add

 function add()
 {
     if ($this->m_dbLink) {
         $this->data_elems[TRANS_BUSNATURE_FOR_YEAR] = date("Y");
         $this->data_elems[TRANS_BUSNATURE_TS_CREATE] = date("Y-m-d H:i:s");
         $this->data_elems[TRANS_BUSNATURE_TS_UPDATE] = date("Y-m-d H:i:s");
         if (($error_num = $this->validateData()) > 0) {
             $strValues = $this->getData();
             $ret = ebpls_insert_data($this->m_dbLink, TRANS_BUSNATURE_TABLE, $strValues);
             if ($ret < 0) {
                 $this->debug("CREATE EBPLSTransactionBusinessNature FAILED [error:{$ret},msg=" . get_db_error() . "]");
                 $this->setError($ret, get_db_error());
                 return $ret;
             } else {
                 $this->debug("CREATE EBPLSTransactionBusinessNature SUCCESSFULL [{$ret}]");
                 return 1;
             }
         } else {
             //print_r($this->getError());
             $this->debug("CREATE EBPLSTransactionBusinessNature FAILED [error:{$ret},msg=" . get_db_error() . "]");
             return $error_num;
         }
     } else {
         $this->debug("CREATE EBPLSTransactionBusinessNature FAILED INVALID DB LINK {$this->m_dbLink}");
         $this->setError($ret, "Invalid Db link {$this->m_dbLink}");
         return -1;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:28,代码来源:ebpls.transaction.class.php


示例5: load

 function load()
 {
     $strValues[$key] = "*";
     //$strWhere[BUSINESS_ID] = $this->business_id;
     $strWhere[NATURE_BUSINESS_NATURE_CODE] = $this->getData(NATURE_BUSINESS_NATURE_CODE);
     $result = ebpls_select_data($this->m_dbLink, NATURE_BUSINESS_REF_TABLE, $strValues, $strWhere, NULL, $strOrderBy, "DESC", NULL);
     if (is_array($result)) {
         $this->data_elems[NATURE_BUSINESS_ID] = $this->business_id;
         $this->data_elems[NATURE_BUSINESS_NATURE_CODE] = $result[0][NATURE_BUSINESS_NATURE_CODE];
         unset($this->data_elems[NATURE_BUSINESS_NATURE_DESC]);
         return 1;
     } else {
         if ($result < 0 || $result == "") {
             $this->setError(-1, "EBPLSEnterpriseNature with nature code " . $strWhere[NATURE_BUSINESS_NATURE_CODE] . " not found.[{$result}]");
         } else {
             $this->setError($result, get_db_error());
         }
         return -1;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:20,代码来源:ebpls.enterprise.class.php


示例6: search

 function search($operator_id, $motor_model = NULL, $motor_no = NULL, $chassis_no = NULL, $plate_no = NULL, $body_no = NULL, $page = 1, $maxrec = 1000000, $orderkey = EBPLS_MOTORIZED_VEH_MOTOR_ID, $is_desc = true)
 {
     if ($operator_id != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_OPERATOR_ID] = $operator_id;
     }
     if ($motor_model != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_MOTOR_MODEL] = array("like", "{$motor_model}%");
     }
     if ($motor_no != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_MOTOR_NO] = array("like", "{$motor_no}%");
     }
     if ($chassis_no != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_CHASSIS_NO] = array("like", "{$chassis_no}%");
     }
     if ($plate_no != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_PLATE_NO] = array("like", "{$plate_no}%");
     }
     if ($body_no != NULL) {
         $strWhere[EBPLS_MOTORIZED_VEH_BODY_NO] = array("like", "{$body_no}%");
     }
     // select all columns
     $strValues[] = "*";
     if ($orderkey != NULL) {
         $strOrder[$orderkey] = $orderkey;
     } else {
         $strOrder = $orderkey;
     }
     if (count($strWhere) <= 0) {
         $this->setError(-1, "No search parameters.");
         return -1;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_MOTORIZED_VEHICLES_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLSOwner object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSMotorizedVehicle($this->m_dbLink);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:45,代码来源:ebpls.motorizedoperator.class.php


示例7: delete

 function delete($owner_id)
 {
     $strWhere[CIT_ID] = $owner_id;
     $strValues[] = "count(*) as cnt";
     // check if owner have existing transactions
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_CTC_INTEREST_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:11,代码来源:eBPLS.ctc.interest.class.php


示例8: delete

 function delete($owner_id)
 {
     $strWhere[OCCUPANCY_TYPE_CODE] = $owner_id;
     //$strValues[] = "count(*) as cnt";
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_OCCUPANCY_TYPE_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:10,代码来源:eBPLS.occupancy.class.php


示例9: select

 function select($code = NULL, $page = 1, $maxrec = 100000000, $orderkey = SYSREF_CODE, $is_desc = true)
 {
     if ($code != NULL) {
         $strWhere[$this->m_strCodeKey] = $code;
     }
     if ($orderkey != SYSREF_CODE && $orderkey != SYSREF_DESC && $orderkey != SYSREF_CREATE_TS && $orderkey != SYSREF_UPDATE_TS && $orderkey != SYSREF_ADMIN) {
         $this->setError(-1, "Invalid order key value {$orderkey}.");
         return -1;
     }
     // select all columns
     $strValues[] = "*";
     if ($orderkey != NULL) {
         $strOrder[$this->m_strTableKeyConst . $orderkey] = $this->m_strTableKeyConst . $orderkey;
     } else {
         $strOrder = $this->m_strCodeKey;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, $this->m_strTableKey, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLSSysRef object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSSysRef($this->m_dbLink, $this->m_strTableKey);
             $records[$i]->setData(NULL, $result["result"][$i]);
             $records[$i]->m_strCode = $records[$i]->getData($this->m_strCodeKey);
             $records[$i]->m_strDesc = $records[$i]->getData($this->m_strDescKey);
             $records[$i]->m_tsCreate = $records[$i]->getData($this->m_strCreateKey);
             $records[$i]->m_tsUpdate = $records[$i]->getData($this->m_strUpdateKey);
             $records[$i]->m_strAdmin = $records[$i]->getData($this->m_strAdminKey);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:35,代码来源:ebpls.sysref.class.php


示例10: search

 /**
  * Find function searches Owner table for users having exact values for firstname, lastname, middlename, email address, birthdate.
  *
  * Set a NULL value to any of the parameters a users wishes not included on the search function. 
  *
  * Search uses AND on query on all of the non-NULL parameters provided. Exact string match is implemented.
  *
  * Search result can be order by setting orderkey as any of the pre-defined data elements constants defined above,
  * set $is_desc to true to use DESC otherwise set to false. 
  * 
  * Paging is automatically provided by letting users of this method provide the page number and the max records per page. 
  * Page result are automaticallly selected give these information, by rule $maxrec should be > 0 and $page should be > 1 and < maxpages
  *
  * Result of this method is a 2-dim array, having keys "page_info" and "result"
  * First element of result having key "page_info" contains all the information regarding the query
  * 		total = number of total records of search
  *		max_pages = number of pages in search
  *		count = number of records on current page
  *		page = current page selected
  * Second element of array having key "result" contains result of the search. "result" search value is an array of EBLPSCTC objects
  *
  *
  */
 function search($fname = NULL, $mname = NULL, $lname = NULL, $email = NULL, $bdate = NULL, $page = 1, $maxrec = 1000000000, $orderkey = OWNER_REG_DATE, $is_desc = true)
 {
     if ($fname != NULL) {
         $strWhere[OWNER_FIRST_NAME] = array("like", "{$fname}%");
     } else {
         if ($this->data_elems[OWNER_FIRST_NAME] != "") {
             $strWhere[OWNER_FIRST_NAME] = array("like", $this->data_elems[OWNER_FIRST_NAME] . "%");
         }
     }
     if ($mname != NULL) {
         $strWhere[OWNER_MIDDLE_NAME] = array("like", "{$mname}%");
     } else {
         if ($this->data_elems[OWNER_MIDDLE_NAME] != "") {
             $strWhere[OWNER_MIDDLE_NAME] = array("like", $this->data_elems[OWNER_MIDDLE_NAME] . "%");
         }
     }
     if ($lname != NULL) {
         $strWhere[OWNER_LAST_NAME] = array("like", "{$lname}%");
     } else {
         if ($this->data_elems[OWNER_LAST_NAME] != "") {
             $strWhere[OWNER_LAST_NAME] = array("like", $this->data_elems[OWNER_LAST_NAME] . "%");
         }
     }
     if ($address != NULL) {
         $strWhere[OWNER_EMAIL_ADDRESS] = array("like", "{$email}%");
     } else {
         if ($this->data_elems[OWNER_EMAIL_ADDRESS] != "") {
             $strWhere[OWNER_EMAIL_ADDRESS] = array("like", $this->data_elems[OWNER_EMAIL_ADDRESS] . "%");
         }
     }
     if ($bdate != NULL) {
         $strWhere[OWNER_BIRTH_DATE] = "{$bdate}";
     } else {
         if ($this->data_elems[OWNER_BIRTH_DATE] != "") {
             $strWhere[OWNER_BIRTH_DATE] = $this->data_elems[OWNER_BIRTH_DATE];
         }
     }
     // select all columns
     $strValues[] = "*";
     if ($orderkey != NULL) {
         $strOrder[$orderkey] = $orderkey;
     } else {
         $strOrder = $orderkey;
     }
     if (count($strWhere) <= 0) {
         $this->setError(-1, "No search parameters.");
         return -1;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_OWNER_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLSOwner object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSOwner($this->m_dbLink);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:85,代码来源:ebpls.owner.class.php


示例11: select

 function select($permit_type = NULL, $trans_type = NULL, $page = 1, $maxrec = 10, $orderkey = "", $is_desc = true)
 {
     // either MOT,PED,BUS,OCC etc...
     if ($permit_type != NULL) {
         if (EBPLS_PDR_PR_TYPE_APP == $this->m_strType) {
             $strWhere[EBPLS_PAR_PERMIT_TYPE] = $permit_type;
             if ($trans_type != NULL) {
                 $strWhere[EBPLS_PAR_TRANS_TYPE] = $trans_type;
             }
             if ($permit_type != NULL) {
                 $strWhere[EBPLS_PAR_PERMIT_TYPE] = $permit_type;
             }
         } else {
             if (EBPLS_PDR_PR_TYPE_TAX == $this->m_strType) {
                 $strWhere[EBPLS_PTR_PERMIT_TYPE] = $permit_type;
                 if ($trans_type != NULL) {
                     $strWhere[EBPLS_PTR_TRANS_TYPE] = $trans_type;
                 }
                 if ($permit_type != NULL) {
                     $strWhere[EBPLS_PTR_PERMIT_TYPE] = $permit_type;
                 }
             } else {
                 if (EBPLS_PDR_PR_TYPE_FEE == $this->m_strType) {
                     $strWhere[EBPLS_PFR_PERMIT_TYPE] = $permit_type;
                     if ($trans_type != NULL) {
                         $strWhere[EBPLS_PFR_TRANS_TYPE] = $trans_type;
                     }
                     if ($permit_type != NULL) {
                         $strWhere[EBPLS_PFR_PERMIT_TYPE] = $permit_type;
                     }
                 }
             }
         }
     }
     if ($orderkey != NULL) {
         $strOrder[$orderkey] = $orderkey;
     } else {
         $strOrder[$this->m_strPrimaryKey] = $this->m_strPrimaryKey;
     }
     $strValues[] = "*";
     $result = ebpls_select_data_bypage($this->m_dbLink, $this->m_strTable, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLSPermitDefaultRequirements object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSPermitDefaultRequirements($this->m_dbLink, false);
             //print_r($result["result"][$i]);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:55,代码来源:ebpls.permitdefaultrequirements.class.php


示例12: findBusinessCTC

 function findBusinessCTC($ctc_code, $company, $address, $org_type, $bus_nature, $date_issued, $page, $maxrec = 10, $orderkey = CTC_DATE_ISSUED, $is_desc = true)
 {
     if ($ctc_code != NULL) {
         $strWhere[CTC_CODE] = $ctc_code;
     }
     if ($company != NULL) {
         $strWhere[CTC_COMPANY] = array("like", "{$company}%");
     }
     if ($address != NULL) {
         $strWhere[CTC_COMPANY_ADDRESS] = array("like", "{$address}%");
     }
     if ($org_type != NULL) {
         $strWhere[CTC_ORGANIZATION_TYPE] = $org_type;
     }
     if ($bus_nature != NULL) {
         $strWhere[CTC_BUSINESS_NATURE] = array("like", "{$bus_nature}%");
     }
     if ($date_issued != NULL) {
         $strWhere[CTC_DATE_ISSUED] = array("regexp", "{$date_issued}");
     }
     $strValues[] = "*";
     $strOrder[$orderkey] = $orderkey;
     $result = ebpls_select_data_bypage($this->m_dbLink, $this->m_strTable, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->m_arrError["err_code"] = $result;
         $this->m_arrError["err_mesg"] = get_db_error();
         return $result;
     } else {
         // transform result to EBPLCTC object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSCTC($this->m_dbLink, CTC_TYPE_INDIVIDUAL);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:37,代码来源:ebpls.ctc.class.php


示例13: computeTransactionTotalTaxFeeDue

 function computeTransactionTotalTaxFeeDue($trans_id)
 {
     $strValues[$key] = "sum(tax_total_amount_due)";
     $strWhere[TF_TRANS_ID] = $trans_id;
     $result = ebpls_select_data($this->m_dbLink, TF_TABLE, $strValues, $strWhere, NULL, $strOrderBy, "DESC", NULL);
     if (is_array($result)) {
         return $result[0][0];
     } else {
         $this->setError($result, get_db_error());
         return -1;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:12,代码来源:ebpls.transaction.fees.class.php


示例14: selectWithSystemData

 function selectWithSystemData($code = NULL, $desc = NULL, $type = NULL, $system_data = NULL, $page = 1, $maxrec = 1, $orderkey = EBPLS_TAX_FEE_CODE, $is_desc = true)
 {
     if ($code != NULL && $code != "") {
         $strWhere[EBPLS_TAX_FEE_CODE] = $code;
     }
     if ($desc != NULL && $desc != "") {
         $strWhere[EBPLS_TAX_FEE_DESC] = array("like", "{$desc}%");
     }
     if ($type != NULL) {
         if (is_array($type)) {
             $strWhere[EBPLS_TAX_FEE_TYPE] = array("IN", " ( '" . join("','", $type) . "')");
         } else {
             $strWhere[EBPLS_TAX_FEE_TYPE] = $type;
         }
     }
     if (!is_null($system_data) && ($system_data == "0" || $system_data == "1")) {
         $strWhere[EBPLS_TAX_SYSTEMDATA] = $system_data;
     }
     // select all columns
     $strValues[] = "*";
     if ($orderkey != NULL) {
         $strOrder[$orderkey] = $orderkey;
     } else {
         $strOrder[$orderkey] = EBPLS_TAX_FEE_CODE;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_TAX_FEE_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLTaxFeeSysRef($this->m_dbLink, false);
             $clsFormula = new TaxFeeFormula($this->m_dbLink, false);
             $ret = $clsFormula->view($result["result"][$i][EBPLS_TAX_FORMULA_ID]);
             if ($ret > 0) {
                 $result["result"][$i][EBPLS_TAX_FORMULA] = unserialize($clsFormula->getData(EBPLS_FORMULAS_FORMULA_CLASS));
                 if (!$result["result"][$i][EBPLS_TAX_FORMULA]) {
                     $this->debug("<HR>Error loading formula : " . $result["result"][$i][EBPLS_TAX_FORMULA_ID] . "!<HR>");
                     $this->setError(-2, "Invalid formula on unserialize : " . $result["result"][$i][EBPLS_TAX_FORMULA_ID] . "!");
                     $this->debug("Invalid formula on unserialize : " . $result["result"][$i][EBPLS_TAX_FORMULA_ID] . "!");
                     return -2;
                 }
                 $result["result"][$i][EBPLS_TAX_FORMULA]->setData(NULL, $clsFormula->getData());
                 $records[$i]->setData(NULL, $result["result"][$i]);
             } else {
                 echo 'ID: ' . $result["result"][$i][EBPLS_TAX_FORMULA_ID];
                 return $ret;
             }
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:53,代码来源:ebpls.taxfeeref.class.php


示例15: getTotalAmountDue

 function getTotalAmountDue($trans_id, $tax_fee_code = NULL, $payment_status = NULL)
 {
     $strValues[$key] = " sum(payment_total_amount_due) as t1,sum(payment_amount_paid) as t2,sum(payment_penalty_amount) as p1,sum(payment_penalty_amount_paid) as p2,sum(payment_interest_amount) as i1,sum(payment_interest_amount_paid) as i2 ";
     $strWhere[TPS_TRANS_ID] = $trans_id;
     if ($tax_fee_code != NULL) {
         $strWhere[TPS_PAYMENT_TAX_FEE_CODE] = $tax_fee_code;
     }
     if ($payment_status != NULL) {
         $strWhere[TPS_PAYMENT_STATUS] = $payment_status;
     }
     $result = ebpls_select_data($this->m_dbLink, TPS_TABLE, $strValues, $strWhere, NULL, $strOrderBy, "DESC", NULL);
     if (is_array($result)) {
         $row = $result[0];
         $amount_due = floatval($row["t1"]) - floatval($row["t2"]);
         $amount_due += floatval($row["p1"]) - floatval($row["p2"]);
         $amount_due += floatval($row["i1"]) - floatval($row["i2"]);
         //$this->debug("getTotalAmountDue ok, return $amount_due.");
         return round($amount_due, 2);
     } else {
         $this->setError($result, get_db_error());
         return -1;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:23,代码来源:ebpls.transaction.paymentschedule.class.php


示例16: delete

 function delete($economic_org_id)
 {
     $strWhere[ECONOMIC_ORG_ID] = $economic_org_id;
     $strValues[] = "count(*) as cnt";
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_ECONOMIC_ORGANIZATION_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:10,代码来源:eBPLS.economic.org.class.php


示例17: delete

 function delete($owner_id)
 {
     $strWhere[INDUSTRY_SECTOR_CODE] = $owner_id;
     $strValues[] = "count(*) as cnt";
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_INDUSTRY_SECTOR_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:10,代码来源:eBPLS.industry.class.php


示例18: select

 function select($code = NULL, $acct_nature = NULL, $acct_no = NULL, $dept_code = NULL, $extra_code = NULL, $desc = NULL, $page = 1, $maxrec = 10, $orderkey = EBPLS_ACCT_CODE, $is_desc = true)
 {
     if ($code != NULL) {
         $strWhere[EBPLS_ACCT_CODE] = $code;
     }
     if ($acct_nature != NULL) {
         $strWhere[EBPLS_ACCT_NATURE] = array("like", "{$acct_nature}%");
     }
     if ($acct_no != NULL) {
         $strWhere[EBPLS_ACCT_NO] = array("like", "{$acct_no}%");
     }
     if ($extra_code != NULL) {
         $strWhere[EBPLS_EXTRA_CODE] = array("like", "{$extra_code}%");
     }
     if ($desc != NULL) {
         $strWhere[EBPLS_ACCT_DESC] = array("like", "{$desc}%");
     }
     // select all columns
     $strValues[] = "*";
     if ($orderkey != NULL) {
         $strOrder[$orderkey] = $orderkey;
     } else {
         $strOrder[$orderkey] = EBPLS_ACCT_CODE;
     }
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_COT_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLTaxFeeSysRef object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLChartOfAccountsSysRef($this->m_dbLink, false);
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
 }
开发者ID:laiello,项目名称:ebpls,代码行数:38,代码来源:ebpls.chartofaccountsref.class.php


示例19: delete

 function delete($temp_id)
 {
     $strWhere[TEMP_ID] = $temp_id;
     $strValues[] = "count(*) as cnt";
     $result = ebpls_delete_data($this->m_dbLink, EBPLS_ZIP_TABLE, $strWhere);
     if ($result < 0) {
         $this->setError($result, get_db_error());
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:10,代码来源:eBPLS.zip.code.class.php


示例20: getBusinessNatureTaxFees

 function getBusinessNatureTaxFees($nature_code, $page = 1, $maxrec = 20, $orderby = EBPLS_BUSINESS_NATURE_TAXFEES_CREATE_TS, $is_desc = false)
 {
     $strWhere[EBPLS_BUSINESS_NATURE_NATURE_CODE] = $nature_code;
     $strValues[] = "*";
     $strOrder[$orderby] = $orderby;
     //return;
     //ebpls_select_data_bypage( $this->m_dbLink, EBPLS_TAX_FEE_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc?"DESC":"ASC", $page, $maxrec );
     $result = ebpls_select_data_bypage($this->m_dbLink, EBPLS_BUSINESS_NATURE_TAXFEES_TABLE, $strValues, $strWhere, NULL, $strOrder, $is_desc ? "DESC" : "ASC", $page, $maxrec);
     if (!is_array($result) && $result < 0) {
         $this->setError($result, get_db_error());
         return $result;
     } else {
         // transform result to EBPLSBusinessNatureTaxes object
         for ($i = 0; $i < count($result["result"]); $i++) {
             $records[$i] = new EBPLSBusinessNatureTaxes($this->m_dbLink, false);
             $records[$i]->getTaxFee();
             $records[$i]->setData(NULL, $result["result"][$i]);
         }
         $result["result"] = $records;
         return $result;
     }
     return $result;
 }
开发者ID:laiello,项目名称:ebpls,代码行数:23,代码来源:ebpls.businessnaturetaxfees.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_db_link函数代码示例发布时间:2022-05-15
下一篇:
PHP get_db_directories函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap