Database error please help

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*pi()/180)) * sin((msv1.string*pi()/180))+cos((*pi()/180)) * cos((msv1.string*pi' at line 1

QUERY: SELECT DISTINCT e.*, (((acos(sin((*pi()/180)) * sin((msv1.string*pi()/180))+cos((*pi()/180)) * cos((msv1.string*pi()/180)) * cos((( - msv2.string)*pi()/180))))*180/pi())*60*1.1515*1.609344) as distance FROM elgg_entities e JOIN elgg_entity_relationships r on r.guid_one = e.guid JOIN elgg_metadata n_table on
e.guid = n_table.entity_guid JOIN elgg_metadata n_table1
on e.guid = n_table1.entity_guid JOIN elgg_metastrings msn1
on n_table1.name_id = msn1.id JOIN elgg_metastrings msv1
on n_table1.value_id = msv1.id JOIN elgg_metadata n_table2
on e.guid = n_table2.entity_guid JOIN elgg_metastrings msn2
on n_table2.name_id = msn2.id JOIN elgg_metastrings msv2
on n_table2.value_id = msv2.id WHERE (((msn1.string = 'geo:lat' AND BINARY msv1.string
!= '' AND ( (1 = 1) and n_table1.enabled='yes')) AND (msn2.string = 'geo:long' AND BINARY msv2.string
!= '' AND ( (1 = 1) and n_table2.enabled='yes')))) AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ( (1 = 1) and e.enabled='yes') ORDER BY distance ASC LIMIT 0, 5