my $sth = $dbh->prepare("SELECT userid, login_name, realname FROM profiles WHERE login_name = ?"); # and then $sth->execute($user_login_name);