SELECTstorename,sid,lng,lat,distribution,sqrt(((( { $lng }- lng ) * PI( ) * 12656 * cos( ( ( { $lat }+ lat ) / 2 ) * PI( ) / 180 ) / 180) * (( { $lng }- lng ) * PI( ) * 12656 * cos ( ( ( { $lat }+ lat ) / 2 ) * PI( ) / 180 ) / 180)) + (( ( { $lat }- lat ) * PI( ) * 12656 / 180 ) * ( ( { $lat }- lat ) * PI( ) * 12656 / 180 ))) / 2 AS juliFROM".$GLOBALS['ecs']->table('store')."HAVING( juli <= distribution )ORDER BYjuli ASCLIMIT 1
