當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Report_Form::whereClause方法代碼示例

本文整理匯總了PHP中CRM_Report_Form::whereClause方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Report_Form::whereClause方法的具體用法?PHP CRM_Report_Form::whereClause怎麽用?PHP CRM_Report_Form::whereClause使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Report_Form的用法示例。


在下文中一共展示了CRM_Report_Form::whereClause方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: whereClause

 /**
  * Generate where clause.
  *
  * We are overriding this primarily for 'before-after' handling of the receive_date placeholder field.
  *
  * We call this twice. The first time we are generating a temp table and we want to do an IS NULL on the
  * join that draws in contributions from this year. The second time we are filtering elsewhere (contacts via
  * the temp table & contributions via selective addition of contributions in the select function).
  *
  * If lifetime total is NOT selected we can add a further filter here to possibly improve performance
  * but the benefit if unproven as yet.
  * $clause = $this->whereClauseLastYear("{$this->_aliases['civicrm_contribution']}.receive_date");
  *
  * @param array $field Field specifications
  * @param string $op Query operator (not an exact match to sql)
  * @param mixed $value
  * @param float $min
  * @param float $max
  *
  * @return null|string
  */
 public function whereClause(&$field, $op, $value, $min, $max)
 {
     if ($field['name'] == 'receive_date') {
         $clause = 1;
         if (empty($this->contactTempTable)) {
             $this->_whereClauses[] = "cont_exclude.id IS NULL";
         }
     } else {
         $clause = parent::whereClause($field, $op, $value, $min, $max);
     }
     return $clause;
 }
開發者ID:saurabhbatra96,項目名稱:civicrm-core,代碼行數:33,代碼來源:Lybunt.php

示例2: whereClause

 /**
  * Generate where clause.
  *
  * We are overriding this primarily for 'before-after' handling of the receive_date placeholder field.
  *
  * We call this twice. The first time we are generating a temp table and we want to do an IS NULL on the
  * join that draws in contributions from this year. The second time we are filtering elsewhere (contacts via
  * the temp table & contributions via selective addition of contributions in the select function).
  *
  * If lifetime total is NOT selected we can add a further filter here to possibly improve performance
  * but the benefit if unproven as yet.
  * $clause = $this->whereClauseLastYear("{$this->_aliases['civicrm_contribution']}.receive_date");
  *
  * @param array $field Field specifications
  * @param string $op Query operator (not an exact match to sql)
  * @param mixed $value
  * @param float $min
  * @param float $max
  *
  * @return null|string
  */
 public function whereClause(&$field, $op, $value, $min, $max)
 {
     if ($field['name'] == 'receive_date') {
         $clause = 1;
         if (empty($this->contactTempTable)) {
             $this->_whereClauses[] = "cont_exclude.id IS NULL";
         }
     } else {
         $clause = parent::whereClause($field, $op, $value, $min, $max);
     }
     if ($field['name'] == 'contribution_status_id' || $field['name'] == 'financial_type_id') {
         $this->_statusClause .= " AND " . $clause;
     }
     return $clause;
 }
開發者ID:konadave,項目名稱:civicrm-core,代碼行數:36,代碼來源:Lybunt.php


注:本文中的CRM_Report_Form::whereClause方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。