Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:
I want to replace some things in MySQL fields.
Unfortunately those things are quotes.
So I have a statement like this:
UPDATE table_name SET `fieldname` = REPLACE(`fieldname`,'‘','''')which replaces a "smart quote" type apostrophe with a regular one (MySQL's way of escaping a quote is to double it).
That statement you can see above works from the command line, but not if I use DBI's do() function.
Any suggestions? Any way in which I can pass in quotes without having problems with DBI quoting the quotes around the quotes?
Any other way to attack this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI and some complicated quotes
by davido (Cardinal) on Sep 21, 2012 at 04:13 UTC | |
by tobyink (Canon) on Sep 21, 2012 at 08:59 UTC | |
by davido (Cardinal) on Sep 21, 2012 at 09:09 UTC | |
|
Re: DBI and some complicated quotes
by tobyink (Canon) on Sep 21, 2012 at 08:56 UTC |