Update: 2026-07-04 21:42:33
This commit is contained in:
@@ -27,10 +27,10 @@ try {
|
|||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'get_task':
|
case 'get_task':
|
||||||
$stmt = $con->prepare("
|
$stmt = $con->prepare("
|
||||||
SELECT id, type, target_url, content_text, media_url
|
SELECT id, type
|
||||||
FROM marketing_tasks
|
FROM marketing_tasks
|
||||||
WHERE status = 'pending' AND platform = ? AND (scheduled_at IS NULL OR scheduled_at <= NOW())
|
WHERE status = 'pending' AND platform = ?
|
||||||
ORDER BY created_at ASC LIMIT 1
|
ORDER BY id ASC LIMIT 1
|
||||||
");
|
");
|
||||||
$stmt->execute([$platform]);
|
$stmt->execute([$platform]);
|
||||||
$task = $stmt->fetch(PDO::FETCH_ASSOC);
|
$task = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|||||||
Reference in New Issue
Block a user