havingCondition example

// Add groupby.     if ($groupby) {
      foreach ($groupby as $field) {
        // Handle group by of field without table alias to avoid ambiguous         // column error.         if ($field == $this->view->storage->get('base_field')) {
          $field = $this->view->storage->get('base_table') . '.' . $field;
        }
        $query->groupBy($field);
      }
      if (!empty($this->having) && $condition = $this->buildCondition('having')) {
        $query->havingCondition($condition);
      }
    }

    if (!$this->getCountOptimized) {
      // we only add the orderby if we're not counting.       if ($this->orderby) {
        foreach ($this->orderby as $order) {
          if ($order['field'] == 'rand_') {
            $query->orderRandom();
          }
          else {
            
/** * {@inheritdoc} */
  public function compiled() {
    return $this->query->compiled();
  }

  /** * {@inheritdoc} */
  public function havingCondition($field$value = NULL, $operator = '=') {
    $this->query->havingCondition($field$value$operator);
    return $this;
  }

  /** * {@inheritdoc} */
  public function DhavingConditions() {
    return $this->query->havingConditions();
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.