prepare($sql); // The execute method returns true on success and false on failure. $success = $stmt->execute([ ':latitude' => $latitude, ':longitude' => $longitude, ':heading' => $heading, ':speed' => $speed, ':distance' => $distance, ':status' => $status, // ':updated_at' => $updated_at, <-- قمنا بحذف هذا السطر من المصفوفة لأنه لم يعد موجوداً في الاستعلام ':driver_id' => $driver_id ]); if ($success) { printSuccess("Car location updated successfully"); } else { printFailure("Failed to update car location"); } } catch (PDOException $e) { http_response_code(500); printFailure('Database error occurred'); } ?>