How can i apply mysql MIN() over mixed decimal value and scientific notation values. I need to get minimum distance using latitude longitude equation in a mysql query with MIN(). It is working if the distance are decimal. But it is not working properly, if some distance are too small like "5.89872212195226e-05"
The problem is MIN(4,5.89872212195226e-05) in a mysql query will always return '4'.
Here is the part of query
MIN (
(acos(sin((".$searchLat."*pi()/180)) *
sin((b_loc.locLatitude*pi()/180))+cos((".$searchLat."*pi()/180)) *
cos((b_loc.locLatitude*pi()/180))
* cos(((".$searchlng."- b_loc.locLongitude)*pi()/180))))*180/pi())*60*1.1515
) as mindistance
Any solution? Thank You