What almut is talking about:
#instead of: $sql = qq { insert into my_table (update_1) values ('$sometext') }; $sth = $dbh->prepare($sql); $sth->execute(); #use placeholders: $sql = qq { insert into my_table (update_1) values (?) }; $sth = $dbh->prepare($sql); $sth->execute($sometext);
First, it will do all the escaping for you, second, will protect your script against injection attacks.
BTW, if you are going to do a lot of this, you should look at a framework like CGI::Application that does a lot of the heavy lifting for you.
In reply to Re: MySQL question
by bradcathey
in thread MySQL question
by Dranzaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |