There's more than one way to do things | |
PerlMonks |
Re: Handling delimitersby 1nickt (Canon) |
on May 30, 2017 at 20:01 UTC ( [id://1191632]=note: print w/replies, xml ) | Need Help?? |
Hi, in general it's a bad idea to build SQL by hand like that. As you have found, you quickly run into complications with quoting, special characters, etc. At a minimum you should build the SQL statement with "placeholders" and "bind values" (look for those terms in the DBI docs). But your life may be made easier if you use SQL::Abstract or SQL::Abstract::More. Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|