public function addCondition($condition, $params = array(), $link = 'AND') {
        if (is_array($condition)) {
            $condition = $this->_fromArray($condition);
        }
        if (!$this->condition) { // if condition it's not already set then just add this one
            $this->condition = $condition;
            $this->setParams($params);
            return $this;
        }
        $this->condition = '(' . $this->condition . ') ' . $link . ' (' . $condition . ')';
        $this->setParams($params);
        return $this;
    }
public function addCondition($condition, $params = array(), $link = 'AND') {
        if (is_array($condition)) {
            $condition = $this->_fromArray($condition);
        }
        if (!$this->condition) { // if condition it's not already set then just add this one
            $this->condition = $condition;
            $this->setParams($params);
            return $this;
        }
        $this->condition = '(' . $this->condition . ') ' . $link . ' (' . $condition . ')';
        $this->setParams($params);
        return $this;
    }
public function addCondition ( $ condition , $ params = array ( ) , $ link = 'AND' ) { if ( is_array ( $ condition ) ) { $ condition = $ this -> _fromArray ( $ condition ) ; } if ( ! $ this -> condition ) { // if condition it's not already set then just add this one $ this -> condition = $ condition ; $ this -> setParams ( $ params ) ; return $ this ; } $ this -> condition = '(' . $ this -> condition . ') ' . $ link . ' (' . $ condition . ')' ; $ this -> setParams ( $ params ) ; return $ this ; }
Adds another condition to the current one.

@param string $condition Condition to be added. Can be a string or an associative array column=>value
@param array|string[string] $params Optional, list of parameters used be the string condition
@param string $link Connection with old condition, by default it's "AND"
@return $this
Adds another condition to the current one .