my $q_ID = $dbh->quote($ID); my $sth = $dbh->prepare("select foo from bar where baz = $q_ID");