Delete forum_read records more efficiently

This commit is contained in:
moodler
2005-04-23 05:06:17 +00:00
parent cff53d2c4a
commit f8156e56eb
+1 -1
View File
@@ -3272,7 +3272,7 @@ function forum_tp_clean_read_records() {
'WHERE fp.modified < '.$cutoffdate.' AND fp.id = fr.postid';
if (($oldreadposts = get_records_sql($sql))) {
foreach($oldreadposts as $oldreadpost) {
delete_records('forum_read', 'userid', $oldreadpost->userid, 'postid', $oldreadpost->postid);
delete_records('forum_read', 'id', $oldreadpost->id);
}
}