Skip to content

Commit

Permalink
Fix SQL limit code as suggested by jaume77 - moodlehq#34
Browse files Browse the repository at this point in the history
  • Loading branch information
doctorlard committed Aug 3, 2021
1 parent 83f7b74 commit 33fa39b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cli/migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@
mtrace("Search for $limit non migrated hvp activites\n");

list($sql, $params) = api::get_sql_hvp_to_migrate(false, null, $contenttypes);
if (!empty($limit)) {
$sql .= " LIMIT " . $limit;
}

$activities = $DB->get_records_sql($sql, $params);
$activities = $DB->get_records_sql($sql, $params, 0, $limit);

if (empty($activities)) {
mtrace(" * No activites are found.\n");
Expand Down

0 comments on commit 33fa39b

Please sign in to comment.