$sth = $dbh->prepare(qq{ SELECT * from login where log = ? }) or die("Failed to prepare: $DBI::errstr\n"); $sth->execute($logname) or die("Failed to execute: $DBI::errstr\n");