Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
[erix]: heh

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-04-25 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?