当前位置: 首页>>代码示例>>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;未经允许,请勿转载。