Skip to content
Browse files

MDL-33788 completion: SQL optimisation

  • Loading branch information...
1 parent 305fbe7 commit c4c0b5a4e9d407f438c4583996cd690fddb72ad8 @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
@@ -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.
Something went wrong with that request. Please try again.