I am currently learning to use Prepared Statements in PHP/MySQLi.
I have an existing mysql query that normally works but I want to convert it to a prepared statement query instead.
$qry = "SELECT *,(((acos(sin((".$latitude."*pi()/180)) * sin((`Latitude`*pi()/180))+cos((".$latitude."*pi()/180)) * cos((`Latitude`*pi()/180)) * cos(((".$longitude."- `Longitude`)*pi()/180))))*180/pi())*60*1.1515) as distance FROM properties WHERE distance <= ".$distance;
Can anyone do that for me as I am struggling with it?