Permalink
Browse files

MDL-33788 completion: SQL optimisation

  • Loading branch information...
1 parent f2867a8 commit 48bdd5217261e6bb3a8b4a4296bcd1da13250a3e @srynot4sale srynot4sale committed Jun 16, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/completion/cron.php
View
5 lib/completion/cron.php
@@ -377,10 +377,11 @@ function completion_cron_completions() {
SET
reaggregate = 0
WHERE
- reaggregate < {$timestarted}
+ reaggregate < :timestarted
+ AND reaggregate > 0
";
- $DB->execute($sql);
+ $DB->execute($sql, array('timestarted' => $timestarted));
}
/**

0 comments on commit 48bdd52

Please sign in to comment.