Exemplo n.º 1
0
 /**
  * Sets the having conditions for the query.
  *
  * @param array|string $field
  * @param string|bool  $condition condition value (optional)
  * @param string       $operator  operator (optional)
  *
  * @return self
  */
 public function having($field, $condition = false, $operator = '=')
 {
     if (func_num_args() >= 2) {
         $this->having->addCondition($field, $condition, $operator);
     } else {
         $this->having->addCondition($field);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Adds a where not condition to the query.
  *
  * @param string $field
  * @param string $condition condition value (optional)
  *
  * @return self
  */
 public function not($field, $condition = true)
 {
     $this->where->addCondition($field, $condition, '<>');
     return $this;
 }