http://www.perlmonks.org?node_id=181232


in reply to DBI and MySQL

I think you've got a "where" too many. But this is also a situation where placeholders could save you grief. Also, your laudable error-checking wd be even better with die instead of print. Try the following (obviously unchecked):
$dbh = DBI->connect('DBI:mysql:dataflex') or die "Couldn't connect to +database: " . DBI->errstr; $sql = "SELECT * FROM dataflex where attorney = ? and issue = ?"; $sth = $dbh->prepare($sql) or die "preparing: ",$dbh->errstr; $sth->execute($INPUT{'attorney'},$INPUT{'issue'}) or die "executing: " +, $dbh->errstr;


§ George Sherston