protected function _where($condition, $value = null, $type = null, $bool = true)
    {
        if (count($this->_parts[self::UNION])) {
            // require_once 'Zend/Db/Select/Exception.php';
            throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION);
        }

        if ($value !== null) {
            $condition = $this->_adapter->quoteInto($condition, $value, $type);
        }

        $cond = "";
        if ($this->_parts[self::WHERE]) {
            if ($bool === true) {
                $cond = self::SQL_AND . ' ';
            } else {
                $cond = self::SQL_OR . ' ';
            }
        }

        return $cond . "($condition)";
    }
protected function _where($condition, $value = null, $type = null, $bool = true)
    {
        if (count($this->_parts[self::UNION])) {
            // require_once 'Zend/Db/Select/Exception.php';
            throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION);
        }

        if ($value !== null) {
            $condition = $this->_adapter->quoteInto($condition, $value, $type);
        }

        $cond = "";
        if ($this->_parts[self::WHERE]) {
            if ($bool === true) {
                $cond = self::SQL_AND . ' ';
            } else {
                $cond = self::SQL_OR . ' ';
            }
        }

        return $cond . "($condition)";
    }
protected function _where ( $ condition , $ value = null , $ type = null , $ bool = true ) { if ( count ( $ this -> _parts [ self :: UNION ] ) ) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception ( "Invalid use of where clause with " . self :: SQL_UNION ) ; } if ( $ value !== null ) { $ condition = $ this -> _adapter -> quoteInto ( $ condition , $ value , $ type ) ; } $ cond = "" ; if ( $ this -> _parts [ self :: WHERE ] ) { if ( $ bool === true ) { $ cond = self :: SQL_AND . ' ' ; } else { $ cond = self :: SQL_OR . ' ' ; } } return $ cond . "($condition)" ; }
Internal function for creating the where clause

@param string   $condition
@param mixed    $value  optional
@param string   $type   optional
@param boolean  $bool  true = AND, false = OR
@return string  clause
Internal function for creating the where clause