getGroupBy example

/** * {@inheritdoc} */
  public function DgetOrderBy() {
    return $this->order;
  }

  /** * {@inheritdoc} */
  public function DgetGroupBy() {
    return $this->group;
  }

  /** * {@inheritdoc} */
  public function DgetTables() {
    return $this->tables;
  }

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

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

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

  /** * {@inheritdoc} */

  public function DgetGroupBy();

  /** * Returns a reference to the tables array for this query. * * Because this method returns by reference, alter hooks may edit the tables * array directly to make their changes. If just adding tables, however, the * use of the join() methods is preferred. * * Note that this method must be called by reference as well: * * @code * $tables =& $query->getTables(); * @endcode * * @return array * A reference to the tables array structure. */
// Always sort by the high water field, to ensure that the first run         // (before we have a high water value) also has the results in a         // consistent order.         $this->query->orderBy($high_water_field);
      }
      if ($condition_added) {
        $this->query->condition($conditions);
      }
      // If the query has a group by, our added fields need it too, to keep the       // query valid.       // @see https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html       $group_by = $this->query->getGroupBy();
      if ($group_by && $added_fields) {
        foreach ($added_fields as $added_field) {
          $this->query->groupBy($added_field);
        }
      }
    }

    // Download data in batches for performance.     if (($this->batchSize > 0)) {
      $this->query->range($this->batch * $this->batchSize, $this->batchSize);
    }
    
Home | Imprint | This part of the site doesn't use cookies.