Email all agents
select *,(((acos(sin((*pi()/180)) * sin((lat*pi()/180)) + cos((*pi()/180)) * cos((lat*pi()/180)) * cos((( - lng)*pi()/180))))*180/pi())*60*1.1515) as distance,agents.* FROM property left join agents on agents.agentid=property.propertyprefix where rentorsale='R' and propavail='1' and (((acos(sin((*pi()/180)) * sin((lat*pi()/180)) + cos((*pi()/180)) * cos((lat*pi()/180)) * cos((( - lng)*pi()/180))))*180/pi())*60*1.1515) <= 5.0 and agents.private='0' and agents.agentid!='ROOM' and propertyprefix != 'ROOM' group by propertyprefix failed.