my $sth = $dbh->prepare("select * from table where field = :nam"); $sth->bind_param(':nam', $value); $sth->execute();