However, there are couple of other things I'll point out - which you can either take on board, or ignore completely ;)
Update: As has been pointed out below, placeholders are not appropriate for column names (which don't need to be quoted anyway). Have updated my example accordingly.
The above is not only much more robust and secure, it also removes the need to worry about quoting stuff - as this is automagically taken care of by the DBI.my $name = param('name'); my $sth = $dbh->prepare("SELECT foo, bar FROM $pictures_table WHERE st +ats = ? AND poster_name = ?"); $dbh->execute(2, $name);
Cheers,
Darren :)
In reply to Re: single error with a dbh prepare
by McDarren
in thread single error with a dbh prepare
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |