Select * from Places where Latitude between X-D and X+D and Longitude between Y-D and Y+D and GridID in (GridID, GridID1, GridID2, …, GridID8).
The above query should be like below as we are searching based on GridID
Select * from Places where GridID in (GridID, GridID1, GridID2, …, GridID8).