in reply to Re: Perl with MS Access Weirdness
in thread Perl with MS Access Weirdness
Building SQL through interpolation is fine as long as you escape the values first. Most, if not all, DBD drivers provide a quote function that will escape strings for you. Binding placeholders actually does the quoting for you so most people find that easier. I prefer to escape stuff myself.use Text::CSV_XS; my $csv = Text::CSV_XS->new(binary=>1); ...
Take your pick.$dbh->quote($some_string); my $sql = "update some_table where some_attr = '$some_string'";
Finally a cheap plug: use PostgreSQL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Perl with MS Access Weirdness
by Jenda (Abbot) on Jan 28, 2003 at 12:59 UTC |