in reply to Inserting Apostrophes into SQL
I also read about the danger of inserting literal values in SQL but these files come from a well known distributor so there is little to no concern of anything malicious and I would
As you've clearly demonstrated, malicious intent is not required to break improper creation of SQL string literals. You say it's of little concern, yet it's preventing your code from working.
prefer to make the least amount of changes to this script as possible at the moment.
How can it get any simpler than moving a variable to the next line and adding a question mark?
$dbh->do( 'INSERT INTO Foo ( bar, baz ) VALUES ( ?, ? ) ', undef, $bar, $baz );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inserting Apostrophes into SQL
by aheusdens (Initiate) on Nov 16, 2011 at 20:39 UTC | |
by ikegami (Patriarch) on Nov 16, 2011 at 22:13 UTC |