- or download this
foreach my $word (@words) {
my $sth = $dbh->prepare(
...
$sth->execute($word,$word,$word) || die "Error: " . $dbh->errstr;
# do some stuff
}
- or download this
# Add percent sign for LIKE value in DB Search
$word .= "\%$word\%";
- or download this
my $sth = $dbh->prepare(
"SELECT * FROM my_table
...
OR shortdescription LIKE ?
OR name LIKE ?"
) || die "Error: " . $dbh->errstr;