diff --git a/mailpoet/lib/Automation/Engine/Storage/AutomationRunStorage.php b/mailpoet/lib/Automation/Engine/Storage/AutomationRunStorage.php index a9cf451e53..1f8be07845 100644 --- a/mailpoet/lib/Automation/Engine/Storage/AutomationRunStorage.php +++ b/mailpoet/lib/Automation/Engine/Storage/AutomationRunStorage.php @@ -84,7 +84,7 @@ class AutomationRunStorage { $automationRunIds = array_column($automationRuns, 'id'); $sql = sprintf( - "SELECT * FROM $subjectTable WHERE automation_run_id in (%s) order by automation_run_id", + "SELECT * FROM $subjectTable WHERE automation_run_id in (%s) order by automation_run_id, id", implode( ',', array_map(