Update: 2026-07-25 18:42:18
This commit is contained in:
@@ -131,9 +131,11 @@ if ($rideDriverID) {
|
||||
error_log("[MONITOR_RIDE] 6. Querying Tracking DB for Driver ID: " . $rideDriverID);
|
||||
|
||||
$location = null;
|
||||
if ($rideDriverID && isset($con_tracking) && $con_tracking) {
|
||||
if ($rideDriverID) {
|
||||
try {
|
||||
$locationQuery = $con_tracking->prepare("
|
||||
$trackingDb = null;
|
||||
try { $trackingDb = Database::get('tracking'); } catch (Throwable $e) { $trackingDb = $con; }
|
||||
$locationQuery = $trackingDb->prepare("
|
||||
SELECT latitude, longitude, speed, heading, updated_at
|
||||
FROM car_locations
|
||||
WHERE driver_id = :driverID AND status = 'ON'
|
||||
|
||||
Reference in New Issue
Block a user