Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Backslashes with DBI quote( ) and MySQL

by gmax (Abbot)
on Mar 06, 2002 at 08:04 UTC ( #149630=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    <\">
    <'"'>
    
  2. or download this
    my $hexstr = "0x" . unpack("H*", $barestr);
    $dbh->do(qq{insert into test_chars values( $hexstr )});
    # notice that the hexstring has NO QUOTES
    
  3. or download this
    mysql>  select * from test_chars;
    +-------+
    ...
    | '"'   |
    +-------+
    9 rows in set (0.00 sec)
    
  4. or download this
    #
    # Dumping data for table 'test_chars'
    ...
    INSERT INTO test_chars VALUES ('\"');
    INSERT INTO test_chars VALUES ('\\\"');
    INSERT INTO test_chars VALUES ('\'\"\'');
    
  5. or download this
     _  _ _  _  
    (_|| | |(_|><
     _|   
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://149630]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2018-07-21 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (449 votes). Check out past polls.

    Notices?