Perl Monk, Perl Meditation | |
PerlMonks |
Re: What are placeholders in DBI, and why would I want to use them?by schweini (Friar) |
on Nov 13, 2003 at 08:29 UTC ( [id://306737]=note: print w/replies, xml ) | Need Help?? |
I'd just like to add that extensive use of DBI-placeholders renders a CGI-app basically IMMUNE to the so-called "SQL-injection" family of attacks, which consist of shoving a bit of nasty SQL instrucions down your CGI's thraot, which it would - if it doesn't use placeholders or another escaping tactic, just pass on to the DB. This, all by itself, is a very, very nice thing to have, i think. additionally, you can never be sure that some data you could've sworn would never contain a single-quote doesn't end up containing one some day, leaving you with a sometimes quite cryptic syntax-error.
In Section
Seekers of Perl Wisdom
|
|