Skip to content
Browse files

More efficient SQL UPDATE in forum_mark_old_posts_as_mailed() -- impr…

…oves performance under PostgreSQL.
  • Loading branch information...
1 parent 12c181b commit 657af04aac51de516e2fb62e1f42c0c33aa0f69d martinlanghoff committed Mar 20, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/forum/lib.php
View
2 mod/forum/lib.php
@@ -1020,7 +1020,7 @@ function forum_mark_old_posts_as_mailed($endtime) {
global $CFG;
return execute_sql("UPDATE {$CFG->prefix}forum_posts
SET mailed = '1'
- WHERE created < '$endtime'");
+ WHERE created < '$endtime' AND mailed ='0'");
}
function forum_get_user_posts($forumid, $userid) {

0 comments on commit 657af04

Please sign in to comment.
Something went wrong with that request. Please try again.