joined:Feb 12, 2007
i have a select query which basically gets the number of results that are less than a set distance and then outputs that with a simple echo:
echo 'distance=' . $row['distance'] . ' km';
the value of distance is currently 14 decimal places which is way over the top obviouslys i only need 2 decimal places
do i need to reduce decimal places in the select query or can i do it within echo ? if so how? :)
"SELECT *, ( *snip haversine formula*) AS distance FROM tablename HAVING distance < '%s'"