If $address, presumably coming from user input, should happen to contain '; DELETE FROM username WHERE id > -1; ', what do you do?
The correct solution is to use placeholders (or if you feel like typing more code, DBI::quote), as the other posters pointed out.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
In reply to Re: Re: Can't pass email address in SQL select statement
by hardburn
in thread Can't pass email address in SQL select statement
by davart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |