Update: 2026-07-04 21:42:33
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user