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


PHP RunnerPage::sGetWhereComponents方法代码示例

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


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

示例1: Chart


//.........这里部分代码省略.........
     $gQuery = $this->pSet->getSQLQuery();
     $masterWhere = "";
     if (!$this->dashChart) {
         $masterTable = $_SESSION[$this->sessionPrefix . "_mastertable"];
         $detailKeysByM = $this->pSet->getDetailKeysByMasterTable($masterTable);
         if (count($detailKeysByM)) {
             for ($i = 0; $i < count($detailKeysByM); $i++) {
                 if ($i != 0) {
                     $masterWhere .= " and ";
                 }
                 if ($this->cipherer && isEncryptionByPHPEnabled()) {
                     $mValue = $this->cipherer->MakeDBValue($detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
                 } else {
                     $mValue = make_db_value($detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
                 }
                 if (strlen($mValue) != 0) {
                     $masterWhere .= RunnerPage::_getFieldSQLDecrypt($detailKeysByM[$i], $this->connection, $this->pSet, $this->cipherer) . "=" . $mValue;
                 } else {
                     $masterWhere .= "1=0";
                 }
             }
         }
     }
     $strWhereClause = "";
     $searchHavingClause = "";
     $strSearchCriteria = "and";
     global $strTableName;
     // search where for basic charts
     if (!$this->webchart) {
         if (!$this->chartPreview && isset($_SESSION[$this->sessionPrefix . '_advsearch'])) {
             $searchClauseObj = SearchClause::UnserializeObject($_SESSION[$this->sessionPrefix . '_advsearch']);
             include_once getabspath('classes/controls/EditControlsContainer.php');
             $editControls = new EditControlsContainer(null, $this->pSet, PAGE_SEARCH, $this->cipherer);
             $whereComponents = RunnerPage::sGetWhereComponents($gQuery, $this->pSet, $searchClauseObj, $editControls, $this->connection);
             $strWhereClause = $whereComponents["searchWhere"];
             foreach ($whereComponents["filterWhere"] as $fWhere) {
                 $strWhereClause = whereAdd($strWhereClause, $fWhere);
             }
             $searchHavingClause = $whereComponents["searchHaving"];
             foreach ($whereComponents["filterHaving"] as $fHaving) {
                 $searchHavingClause = whereAdd($searchHavingClause, $fHaving);
             }
             $strSearchCriteria = $whereComponents["searchUnionRequired"] ? "or" : "and";
         }
     } else {
         if ($this->table_type != "project") {
             $strTableName = "webchart" . $this->cname;
         }
         $strWhereClause = CalcSearchParam($this->table_type != "project");
     }
     if ($strWhereClause) {
         $this->chrt_array['where'] .= $this->chrt_array['where'] ? " AND (" . $strWhereClause . ")" : " WHERE (" . $strWhereClause . ")";
     }
     if ($this->table_type == "project") {
         if (SecuritySQL("Search", $this->chrt_array['tables'][0])) {
             $strWhereClause = whereAdd($strWhereClause, SecuritySQL("Search", $strTableName));
         }
         $this->strSQL = $gQuery->gSQLWhere($strWhereClause, $searchHavingClause, $strSearchCriteria);
         $strOrderBy = $this->gstrOrderBy;
         $this->strSQL .= " " . $strOrderBy;
         if ($masterWhere) {
             $strWhereClause = whereAdd($strWhereClause, $masterWhere);
         }
         $strSQLbak = $this->strSQL;
         if (tableEventExists("BeforeQueryChart", $strTableName)) {
             $tstrSQL = $this->strSQL;
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:67,代码来源:charts.php

示例2: getWhereComponents

 /**
  * Returns array of WHERE and HAVING components organized as array:
  * array(
  *   "commonWhere" => <string with original WHERE clause and security clause and master clause> 
  *   "commonHaving" => <string with original HAVING clause> 
  *   "searchWhere" => <string with WHERE expression from searching>
  *   "searchHaving" => <string with HAVING expression from searching>
  *   "searchUnionRequired" => <boolean value, true if search condition choosed is ANY CRITERIA and there are both non-empty searchWhere and searchHaving expressions>
  *   "filterWhere" => <array with Fieldname => Where string pairs for non aggregated filtered fields>
  *                    array( "Field1" => "Field1 = 'aaa'",
  *                           "Field2" => "Field2 = 'bbb'")
  *   "filterHaving" => <the same as "filterWhere" for aggregated filtered fields>
  *  )
  *  Function results are cached.
  */
 function getWhereComponents()
 {
     if ($this->_cachedWhereComponents) {
         return $this->_cachedWhereComponents;
     }
     $this->_cachedWhereComponents = RunnerPage::sGetWhereComponents($this->gQuery, $this->pSet, $this->searchClauseObj, $this->controls, $this->connection, $this->getMasterTableSQLClause(), $this->SecuritySQL("Search", $this->tName));
     return $this->_cachedWhereComponents;
 }
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:23,代码来源:runnerpage.php


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