Update: 2026-07-04 21:42:33

This commit is contained in:
Hamza-Ayed
2026-07-04 21:42:33 +03:00
parent ce7db27936
commit c4746f08da
+3 -3
View File
@@ -27,10 +27,10 @@ try {
switch ($action) {
case 'get_task':
$stmt = $con->prepare("
SELECT id, type, target_url, content_text, media_url
SELECT id, type
FROM marketing_tasks
WHERE status = 'pending' AND platform = ? AND (scheduled_at IS NULL OR scheduled_at <= NOW())
ORDER BY created_at ASC LIMIT 1
WHERE status = 'pending' AND platform = ?
ORDER BY id ASC LIMIT 1
");
$stmt->execute([$platform]);
$task = $stmt->fetch(PDO::FETCH_ASSOC);