function quote( $value ) {

        $value = $this->format( $value );

        if ( $value === null ) {

            return "NULL";

        }

        if ( $value === false ) {

            return "'0'";

        }

        if ( $value === true ) {

            return "'1'";

        }

        if ( is_int( $value ) ) {

            return "'" . ( (string) $value ) . "'";

        }

        if ( is_float( $value ) ) {

            return "'" . sprintf( "%F", $value ) . "'";

        }

        if ( $value instanceof Literal ) {

            return $value->value;

        }

        return $this->pdo->quote( $value );

    }
function quote( $value ) {

        $value = $this->format( $value );

        if ( $value === null ) {

            return "NULL";

        }

        if ( $value === false ) {

            return "'0'";

        }

        if ( $value === true ) {

            return "'1'";

        }

        if ( is_int( $value ) ) {

            return "'" . ( (string) $value ) . "'";

        }

        if ( is_float( $value ) ) {

            return "'" . sprintf( "%F", $value ) . "'";

        }

        if ( $value instanceof Literal ) {

            return $value->value;

        }

        return $this->pdo->quote( $value );

    }
function quote ( $ value ) { $ value = $ this -> format ( $ value ) ; if ( $ value === null ) { return "NULL" ; } if ( $ value === false ) { return "'0'" ; } if ( $ value === true ) { return "'1'" ; } if ( is_int ( $ value ) ) { return "'" . ( ( string ) $ value ) . "'" ; } if ( is_float ( $ value ) ) { return "'" . sprintf ( "%F" , $ value ) . "'" ; } if ( $ value instanceof Literal ) { return $ value -> value ; } return $ this -> pdo -> quote ( $ value ) ; }
Quote a value for SQL

@param mixed $value
@return string
Quote a value for SQL