public function between($item, $low, $up, $cond = null, $not = false)
    {
        $bClause = '';

        if (null == $this->oosql_where && null == $this->oosql_between && null == $this->oosql_in) {
            $bClause .= ' WHERE ';
        } else {
            $cnd = ' AND ';

            if (null != $cond) {

                if (strtolower($cond) == 'or') {
                    $cnd = ' OR ';
                }

            }
            $bClause .= $cnd;
        }

        if ($not) {
            $item = $item . ' NOT ';
        }
        $bClause .= $item . ' BETWEEN ' . $low . ' AND ' . $up;

        $this->oosql_between = $bClause;

        return $this;
    }
public function between($item, $low, $up, $cond = null, $not = false)
    {
        $bClause = '';

        if (null == $this->oosql_where && null == $this->oosql_between && null == $this->oosql_in) {
            $bClause .= ' WHERE ';
        } else {
            $cnd = ' AND ';

            if (null != $cond) {

                if (strtolower($cond) == 'or') {
                    $cnd = ' OR ';
                }

            }
            $bClause .= $cnd;
        }

        if ($not) {
            $item = $item . ' NOT ';
        }
        $bClause .= $item . ' BETWEEN ' . $low . ' AND ' . $up;

        $this->oosql_between = $bClause;

        return $this;
    }
public function between ( $ item , $ low , $ up , $ cond = null , $ not = false ) { $ bClause = '' ; if ( null == $ this -> oosql_where && null == $ this -> oosql_between && null == $ this -> oosql_in ) { $ bClause .= ' WHERE ' ; } else { $ cnd = ' AND ' ; if ( null != $ cond ) { if ( strtolower ( $ cond ) == 'or' ) { $ cnd = ' OR ' ; } } $ bClause .= $ cnd ; } if ( $ not ) { $ item = $ item . ' NOT ' ; } $ bClause .= $ item . ' BETWEEN ' . $ low . ' AND ' . $ up ; $ this -> oosql_between = $ bClause ; return $ this ; }
Creates a BETWEEN clause
@param mixed $item
@param mixed $low
@param mixed $up
@param string $cond OR|AND
@param boolean $not
@return \Phiber\oosql\oosql
Creates a BETWEEN clause