ezSQL_pdo::escape PHP Method

escape() public method

******************************************************************** Format a string correctly for safe PDO insert (no mater if magic quotes are on or not)
public escape ( $str )
    function escape($str)
    {
        switch (gettype($str)) {
            case 'string':
                $str = addslashes(stripslashes($str));
                break;
            case 'boolean':
                $str = $str === FALSE ? 0 : 1;
                break;
            default:
                $str = $str === NULL ? 'NULL' : $str;
                break;
        }
        return $str;
    }