in reply to DBI prepare() vs do() usage
and execute using method 2.$nick = "'something'; DELETE FROM existingtablename";
Always make sure that the values you insert are quoted properly. Method 2 doesn't ensure that and therefore creates an SQL injection vulnerability.
Of course, if you can be sure that $nick contains what you expect, you can always directly quote the value in the SQL expression, or use the $dbh->quote() method.
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI prepare() vs do() usage
by stvn (Monsignor) on Dec 21, 2003 at 15:00 UTC |