Hello,
I'm running through an issue that I'm seeing the fastest solution.
I have this query to my DB:
$query1="SELECT Position_ID, GPSLatitude, GPSLongitude FROM Position WHERE GPSLatitude BETWEEN $bottomlatitude AND $toplatitude AND GPSLongitude BETWEEN $leftlongitude AND $rightlongitude ORDER BY `Position`.`GPSLatitude` ASC LIMIT $i,1";
The problem is this variables: $bottomlatitude, $toplatitude, $leftlongitude, $rightlongitude might have negative values depending on the position.
When they are all positive it will be ok, but if their negative the BETWEEN statement doesnt make any sense. Does anyone has a solution for this? Is there any SQL command to deal with this? I can't make an abs because I need the result to be stored as it really is, and also to be queried to the database as it really is.
Thank you very much