= :southwestLat AND cl.latitude <= :northeastLat AND cl.longitude >= :southwestLon AND cl.longitude <= :northeastLon AND cl.status = 'off' AND cl.updated_at >= NOW() - INTERVAL 5 SECOND AND (cr.make NOT LIKE '%دراجة%' OR cr.model NOT LIKE '%دراجة%') AND d.gender = 'Female' GROUP BY cl.driver_id ORDER BY ratingDriver DESC, cl.updated_at DESC LIMIT 10; "; $stmt = $con->prepare($sql); $stmt->bindParam(':southwestLat', $southwestLat); $stmt->bindParam(':southwestLon', $southwestLon); $stmt->bindParam(':northeastLat', $northeastLat); $stmt->bindParam(':northeastLon', $northeastLon); $stmt->execute(); $car_locations = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($car_locations) { jsonSuccess($car_locations); } else { jsonError("No car locations found"); } } catch (PDOException $e) { error_log("[getfemalbehavior.php] " . $e->getMessage()); jsonError("An internal error occurred. Please try again later."); } ?>