Updating query to use queryOneRow to simplify handling.