public function dateSub( $column, $expr, $type )
    {
        $type = $this->intervalMap[$type];
        $column = $this->getIdentifier( $column );

        if ( $column != 'NOW()' )
        {
            $column = "CAST( {$column} AS TIMESTAMP )";
        }

        return " {$column} - INTERVAL '{$expr}' {$type} ";
    }
public function dateSub( $column, $expr, $type )
    {
        $type = $this->intervalMap[$type];
        $column = $this->getIdentifier( $column );

        if ( $column != 'NOW()' )
        {
            $column = "CAST( {$column} AS TIMESTAMP )";
        }

        return " {$column} - INTERVAL '{$expr}' {$type} ";
    }
public function dateSub ( $ column , $ expr , $ type ) { $ type = $ this -> intervalMap [ $ type ] ; $ column = $ this -> getIdentifier ( $ column ) ; if ( $ column != 'NOW()' ) { $ column = "CAST( {$column} AS TIMESTAMP )" ; } return " {$column} - INTERVAL '{$expr}' {$type} " ; }
Returns the SQL that subtracts an interval from a timestamp value.

@param string $column
@param numeric $expr
@param string $type one of SECOND, MINUTE, HOUR, DAY, MONTH, or YEAR
@return string
Returns the SQL that subtracts an interval from a timestamp value .