Fix SQL query

This commit is contained in:
Michael 2021-02-15 07:25:45 +00:00
parent c444929022
commit a1a4471632

View File

@ -59,9 +59,9 @@ class ExpirePosts
AND NOT `uri-id` IN (SELECT `parent-uri-id` FROM `post-user` INNER JOIN `contact` ON `contact`.`id` = `contact-id` AND `notify_new_posts`
WHERE `parent-uri-id` = `post-thread`.`uri-id`)
AND NOT `uri-id` IN (SELECT `parent-uri-id` FROM `post-user`
WHERE (`origin` OR `event-id` != 0 OR `post-type` = ?) AND `parent-uri-id` = `post-thread`.`uri-id`))
WHERE (`origin` OR `event-id` != 0 OR `post-type` = ?) AND `parent-uri-id` = `post-thread`.`uri-id`)
AND NOT `uri-id` IN (SELECT `uri-id` FROM `post-content`
WHERE (`resource-id` != 0) AND `uri-id` = `post-thread`.`uri-id`))
WHERE `resource-id` != 0 AND `uri-id` = `post-thread`.`uri-id`)
ORDER BY `id` LIMIT ?", $expire_days, Item::PT_PERSONAL_NOTE, $limit);
$rows = DBA::affectedRows();