- or download this
sub SQLQuote {
my ( $data ) = @_;
$data =~ s/'/\\'/g;
return $data;
};
- or download this
SELECT * FROM table WHERE name=? AND id=?
- or download this
$dsn->Sql($SQL, $name, $id );
- or download this
# Code courtesy of kudra++, errors courtesy of me
$SQL = < SQL;
...
$statement = $dbh->prepare( $SQL );
$statement->execute($name, $id);