How to select distinct one column but return all columns with acos-cos-radians formula
问题 I want to fetch a table named supplier_products which has following columns ID Item_id supplier_id variant_id price lat lng serving_radius(in km) 1 1 2 12 22.00 26.11360000 85.39430000 1 2 1 3 12 44.00 26.11360000 85.39430000 4 3 1 2 13 25.00 26.11360000 85.39430000 4 4 1 3 13 23.00 26.11360000 85.39430000 4 Now for searching supplier products near a latitude and longitude say ($lat = 26.1136;$long = 85.3643;) . i was using this query SELECT *, (6371 * acos(cos(radians('$lat')) * cos(radians