Update: 2026-07-04 04:05:08
This commit is contained in:
@@ -16,8 +16,8 @@ $sql = "
|
||||
SELECT p.id as passenger_id, t.token
|
||||
FROM passengers p
|
||||
JOIN tokens t ON p.id = t.passengerID
|
||||
LEFT JOIN passenger_opening_locations pol ON p.id = pol.start_location
|
||||
WHERE (pol.date IS NULL OR pol.date < DATE_SUB(NOW(), INTERVAL 24 HOUR))
|
||||
LEFT JOIN passenger_opening_locations pol ON p.id = pol.passenger_id
|
||||
WHERE (pol.created_at IS NULL OR pol.created_at < DATE_SUB(NOW(), INTERVAL 24 HOUR))
|
||||
GROUP BY p.id, t.token
|
||||
LIMIT 500 -- Batch size to avoid overloading the server or getting rate-limited
|
||||
";
|
||||
|
||||
Reference in New Issue
Block a user