Fix SQL for getHosts().

The check for rcode != "pending" doesn't find rows where rcode is null on my MySQL 5.6.