Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Escaping quotes - can't quite get it!

by thewebsi (Scribe)
on May 18, 2011 at 09:09 UTC ( [id://905437]=note: print w/replies, xml ) Need Help??


in reply to Escaping quotes - can't quite get it!

$VAR1 = 'client_detail_admin_notes LIKE "%\\"quotes\\"%"';

Which obviously isn't right :(

Actually I think that is what you want. Remember that Data::Dumper doesn't exactly print the actual content of the variable, rather it prints code that may be used to instantiate it. So if you run:

$VAR1 = 'client_detail_admin_notes LIKE "%\\"quotes\\"%"'; print $VAR1;

you get:

client_detail_admin_notes LIKE "%\"quotes\"%"

as desired.

Replies are listed 'Best First'.
Re^2: Escaping quotes - can't quite get it!
by ultranerds (Hermit) on May 18, 2011 at 09:12 UTC
    Yeah you're right - thats what I realized about 5 minutes ago (when printing out the actual string that was being passed to mySQL)

    Thanks for the pointer though :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://905437]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-28 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found