my @row = $sth->fetchrow_array; $result{userID} = undef; if (@row) { $result{userID} = $row[0];