my $sql = 'SELECT * FROM GlossaryMetadata WHERE Tag1 LIKE ? AND Tag2 LIKE ?'; $sth = $dbh->prepare($sql); $sth->execute($Tag1, $Tag2);