Can you have both 'WHERE' and 'HAVING' in the same query?
For example:
SELECT lat,lon,id, ( 3959 acos( cos( radians(40.034462) ) cos( radians( lat ) ) cos( radians( lon ) - radians(-82.867520) ) + sin( radians(40.034462) ) sin( radians( lat ) ) ) ) AS distance FROM office WHERE id =1 AND HAVING distance < 15 ORDER BY distance LIMIT 0 , 20
This zip code radius search seems to through and error with the WHERE in it and works fine when it is removed.