setGroup() public method

public setGroup ( $columns, $params )
示例#1
0
 /**
  * Sets group clause, more calls rewrite old value.
  * @param  string
  * @return self
  */
 public function group($columns)
 {
     $this->emptyResultSet();
     if (func_num_args() === 2 && strpos($columns, '?') === FALSE) {
         trigger_error('Calling ' . __METHOD__ . '() with second argument is deprecated; use $selection->having() instead.', E_USER_DEPRECATED);
         $this->having(func_get_arg(1));
         $this->sqlBuilder->setGroup($columns);
     } else {
         call_user_func_array(array($this->sqlBuilder, 'setGroup'), func_get_args());
     }
     return $this;
 }
示例#2
0
 /**
  * Sets group clause, more calls rewrite old values.
  * @param  string
  * @param  string
  * @return self
  */
 public function group($columns, $having = NULL)
 {
     $this->emptyResultSet();
     $this->sqlBuilder->setGroup($columns, $having);
     return $this;
 }
示例#3
0
 /**
  * Sets group clause, more calls rewrite old value.
  * @param  string
  * @return self
  */
 public function group($columns, ...$params)
 {
     $this->emptyResultSet();
     $this->sqlBuilder->setGroup($columns, ...$params);
     return $this;
 }