<?php
require_once __DIR__ . '/../config/config.php';
$db = Database::getInstance();
$rows = $db->fetchAll('SELECT id,media_id,media_url,conversation_id,status,created_at FROM media_queue ORDER BY created_at ASC LIMIT 100');
echo json_encode($rows, JSON_PRETTY_PRINT) . "\n";