Permalink
Browse files

MDL-33788 completion: SQL optimisation

  • Loading branch information...
Aaron Barnes
Aaron Barnes committed Jun 16, 2012
1 parent 305fbe7 commit c4c0b5a4e9d407f438c4583996cd690fddb72ad8
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/completion/cron.php
View
@@ -382,10 +382,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 c4c0b5a

Please sign in to comment.