correct dbquery result check