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


PHP BizSystem::configuration方法代码示例

本文整理汇总了PHP中BizSystem::configuration方法的典型用法代码示例。如果您正苦于以下问题:PHP BizSystem::configuration方法的具体用法?PHP BizSystem::configuration怎么用?PHP BizSystem::configuration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BizSystem的用法示例。


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

示例1: __construct

 /**
  * Initialize object
  * @param string $module module name
  * @param string $dbname database name alias in configuration file
  * @param string $table database table name
  * @param array $opts more option
  * @return void
  */
 function __construct($module, $dbname, $table, $opts)
 {
     $this->module = $module;
     $this->dbname = $dbname;
     $this->table = $table;
     $this->opts = $opts;
     $this->dbConfig = BizSystem::configuration()->getDatabaseInfo($dbname);
 }
开发者ID:que273,项目名称:siremis,代码行数:16,代码来源:gen_meta.inc.php

示例2: dbs

 protected function dbs()
 {
     $dbinfo = BizSystem::configuration()->getDatabaseInfo();
     $i = 0;
     foreach ($dbinfo as $db) {
         $list[$i]['val'] = $db['Name'];
         $list[$i]['txt'] = $db['Name'];
         $i++;
     }
     return $list;
 }
开发者ID:que273,项目名称:siremis,代码行数:11,代码来源:ToolListbox.php

示例3: buildInsertSQL

 /**
  * Build insert-sql
  * INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)
  *
  * @param BizDataObj $dataObj
  * @param array $joinValues array of join values
  * @return string Insert-SQL statement
  */
 public function buildInsertSQL($dataObj, $joinValues = null)
 {
     // generate column value pairs.
     $sqlFlds = $dataObj->m_BizRecord->getToSaveFields('CREATE');
     $dbInfo = BizSystem::configuration()->getDatabaseInfo($dataObj->m_Database);
     $dbType = $dbInfo["Driver"];
     $sql_col = "";
     $sql_val = "";
     $db = $dataObj->getDBConnection('WRITE');
     foreach ($sqlFlds as $fldobj) {
         $col = $fldobj->m_Column;
         // if Field Id has null value and Id is an identity type, remove the Id's column from the array
         if ($fldobj->m_Name == "Id" && $dataObj->m_IdGeneration == "Identity") {
             continue;
         }
         if ($fldobj->isLobField()) {
             // special value for blob/clob type
             $_val = $fldobj->getInsertLobValue($dbType);
         } else {
             $_val = $fldobj->getSqlValue();
             if ($_val == '' && $fldobj->m_ValueOnCreate != "") {
                 $_val = $fldobj->getValueOnCreate();
             }
         }
         //if (!$_val || $_val == '') continue;
         // modified by jixian for not ignore 0 value
         if ($_val === '') {
             continue;
         }
         $sql_col .= "`" . $col . "`, ";
         $sql_val .= $db->quote($_val) . ", ";
         //$sql_val .= QueryStringParam::formatQueryValue($_val). ", ";
     }
     // if joinValues is given then add join values in to the main table InsertSQL.
     if (is_array($joinValues)) {
         foreach ($joinValues as $joinColumn => $joinValue) {
             if (!$joinValue || $joinValue == '') {
                 continue;
             }
             $sql_col .= "`" . $joinColumn . "`, ";
             $sql_val .= "'" . $joinValue . "', ";
         }
     }
     $sql_col = substr($sql_col, 0, -2);
     $sql_val = substr($sql_val, 0, -2);
     $sql = "INSERT INTO  `" . $dataObj->m_MainTable . "` (" . $sql_col . ") VALUES (" . $sql_val . ")";
     return $sql;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:56,代码来源:BizDataObj_SQLHelper.php

示例4: setQuoteIdentifiers

 /**
  * set char to quote system identifiers
  * @return void
  */
 protected function setQuoteIdentifiers($dataObj)
 {
     if ($this->m_QuoteIdentifiers == null) {
         $this->m_QuoteIdentifiers = '';
         $dbInfo = BizSystem::configuration()->getDatabaseInfo($dataObj->m_Database);
         if (strtoupper($dbInfo["Driver"]) == "PDO_MYSQL") {
             $this->m_QuoteIdentifiers = '`';
         }
     }
 }
开发者ID:que273,项目名称:siremis,代码行数:14,代码来源:TableJoin.php


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