Commit f188c44d authored by Kevin Atkinson's avatar Kevin Atkinson

In DBQuerySingle also fail if there is more than one result.

parent 15506988
......@@ -324,6 +324,8 @@ sub DBQuerySingleFatalN($$)
my $query_result = DBQueryFatalN($dbnum, $query);
DBFatal("DB Query \"$query\" didn't return any results")
unless $query_result->numrows > 0;
DBFatal("DB Query \"$query\" returned more than one row")
unless $query_result->numrows == 1;
my @row = $query_result->fetchrow_array();
return wantarray ? @row : $row[0];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment