Unknown column for calculate field in MySQL -


i having problem in complex query. simplificated version:

select sin(3.14) s my_table s < 1 

error: #1054 - unknown column 's' in 'where clause'

having save you

select *,(((acos(sin((".$lat."*pi()/180)) *sin((latitud*pi()/180)) +cos((".$lat."*pi()/180))  * cos((latitud*pi()/180))  * cos(((".$lng."- longitud)*pi()/180))))*180/pi()) *60*1.1515*1.609344) distance  pois_data,pois_cat  pois_data.idtipo=pois_cat.id , latitud not null   having distance <1 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -