public function between( $expression, $value1, $value2 )
    {
        $expression = $this->getIdentifier( $expression );
        $value1 = $this->getIdentifier( $value1 );
        $value2 = $this->getIdentifier( $value2 );
        return "{$expression} BETWEEN {$value1} AND {$value2}";
    }
public function between( $expression, $value1, $value2 )
    {
        $expression = $this->getIdentifier( $expression );
        $value1 = $this->getIdentifier( $value1 );
        $value2 = $this->getIdentifier( $value2 );
        return "{$expression} BETWEEN {$value1} AND {$value2}";
    }
public function between ( $ expression , $ value1 , $ value2 ) { $ expression = $ this -> getIdentifier ( $ expression ) ; $ value1 = $ this -> getIdentifier ( $ value1 ) ; $ value2 = $ this -> getIdentifier ( $ value2 ) ; return "{$expression} BETWEEN {$value1} AND {$value2}" ; }
Returns SQL that checks if an expression evaluates to a value between
two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

Example:
<code>
$q = ezcDbInstance::get()->createSelectQuery();
$q->select( '*' )->from( 'table' )
->where( $q->expr->between( 'id', $q->bindValue( 1 ), $q->bindValue( 5 ) ) );
</code>

@param string $expression the value to compare to
@param string $value1 the lower value to compare with
@param string $value2 the higher value to compare with
@return string logical expression
Returns SQL that checks if an expression evaluates to a value between two values .