diff options
author | Andrew Dolgov <[email protected]> | 2017-12-05 22:46:18 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-12-05 22:46:18 +0300 |
commit | 8e1450aa1533b59547dfd451e9c979d37eef3486 (patch) | |
tree | 072deccbd0936d9eec0cb15c93c90061dc39ec47 /classes | |
parent | f76f773a16c70f745626e27b9981e6d815681da5 (diff) |
update previous to only affect mysql
Diffstat (limited to 'classes')
-rw-r--r-- | classes/article.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/article.php b/classes/article.php index 7430fac33..edf95b743 100644 --- a/classes/article.php +++ b/classes/article.php @@ -903,9 +903,14 @@ class Article extends Handler_Protected { // purge orphaned posts in main content table + if (DB_TYPE == "mysql") + $limit_qpart = "LIMIT 5000"; + else + $limit_qpart = ""; + $pdo = Db::pdo(); $res = $pdo->query("DELETE FROM ttrss_entries WHERE - NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) LIMIT 5000"); + NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) $limit_qpart"); if ($do_output) { $rows = $res->rowCount(); |