in reply to Using CGI.pm params to make a DBI MySQL query
Placeholders, as frequently mentioned, are your friends:
Yes, this is an extra statement, but it does make life easier for the SQL parser.my $sth=$dbh->prepare("INSERT INTO tbl VALUES(?, ?, ?)"); $sth->execute(param('Col1'), param('Col2'), param('Col3'));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using CGI.pm params to make a DBI MySQL query
by merlyn (Sage) on Oct 09, 2001 at 20:03 UTC |