prepare("SELECT * FROM trips WHERE user_id = ? ORDER BY created_at DESC"); $stmt->execute([$decoded['user_id']]); $trips = $stmt->fetchAll(); json_success($trips); } catch (\PDOException $e) { // If table doesn't exist, return empty for the sake of the skeleton json_success([], 'Trips table not found, returning empty array for demonstration.'); }