Merged from MOODLE_14_STABLE - More efficient SQL UPDATE in forum_mark_old_posts_as_mailed() -- improves performance under PostgreSQL.

This commit is contained in:
martinlanghoff 2005-03-20 23:13:18 +00:00
parent 0418487beb
commit 0362d553eb

View File

@ -1081,7 +1081,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) {