|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: PerlOO what i am doing???by chacham (Prior) |
| on Aug 12, 2012 at 20:32 UTC ( [id://986978]=note: print w/replies, xml ) | Need Help?? |
|
As a side note, building SQL strings is dynamic SQL. It is inefficient, pone to error, and allows for SQL injection. As you're using prepare and execute on the actual statements, you can use placeholders and pass the variable's in a hash (the optional second parameter to execute), which is the first line of defense against SQL injection and more efficient. That is, instead of:
use
It's also a lot easier to read. Note, also, return DBI's error, instead of just $!.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||