$sth = $dbh->prepare('select x, y from z where username=?') or die "prepare: ". $dbh->errstr; $sth->execute($username) or die "execute: ". $dbh->errstr;