php - Search Nearby Lat/Long Query - Radius search works, but need to add another field -
I have a current location query that works on a known latitude / longitude basis. Finds matching matches within a certain radius.
The query is working perfectly, but now I want to add another piece to it.
Assume that I name = "Kennedy Middle School" in
city = "Chicago" and state = "IL"
This ax will create radius radius. If the results are not in the X-mile radius of Chicago, IL, then there is nothing to be discovered.
I want to include the radius part, but there is also another section of the question that matches it originally: " from where [radius query stuff] or choose [city = "Chicago and state =" IL "]
I want to ..." search for the dentist "
This is what my query looks like: < / P>
Code> Select * (SELECT r.name, r.category, r._address, r.city , Against r.state, r.lat, r.long, domaintable.domain, MATCH (name, category) ('Kennedy Beach School%') Pvt. In the form of sexuality, p.radius, p.distance_unit * DEGREES (ACOS (COS (radians (P. altpoint)) * COS (radiance (RLT)) * COS (radians (P. langpoint - r. Long)) + SIN (Redeans (P. AltPoint)) * SIN (Radians (RLT))) from AAS distance from NATABLE_DB AS to R Zone (selection 28.5383355 as LayPoint, -81.37923649999999 AR Landpoint, 5 AS radius, 69.0a distance_unit) on AP peer insertion domentialable.domain at r.state = domaintable.domain where the bloom of the match (name, range) F ( 'Kennedy Middle School * Bullion mode) and Ar.al.alk Between p. Latepoint- (P.RDIS / PDICTC_Inet) and p. Altepoint + (P.RDS / PDIS) and R.L. / (P.distance_unit * COS (RADIANS (P. Allportpoint)) and p. Langpoint + (p.rds / (pdITns_inet * cos (radians (p. Altpoints))) distance and lt; = Distance from the order of the radius
Actually, I just want to go to or where the city = "Chicago" and state = "IL"
also includes.
Everywhere I try and edit the query, I am terminating it or doing nothing.
Any help has been greatly appreciated.
Thank you.
Comments
Post a Comment