probabilmente la query restitusce 0 righe...
fatti stampare
mysql_num_rows ()
Codice PHP:
// Search the rows in the markers table
$query = sprintf("SELECT address, name, lat, lng, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < '%s' ORDER BY distance LIMIT 0 , 20",
mysql_real_escape_string($center_lat),
mysql_real_escape_string($center_lng),
mysql_real_escape_string($center_lat),
mysql_real_escape_string($radius));
$result = mysql_query($query);
echo '
righe='.mysql_num_rows ().'
';
se è 0 porbabilmente vuol dire che la base dati che non è più congruente con quella dell'esempio