Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing cli migrate.php when database is Oracle #34

Closed
jaume77 opened this issue Apr 16, 2021 · 0 comments · Fixed by #38
Closed

Error executing cli migrate.php when database is Oracle #34

jaume77 opened this issue Apr 16, 2021 · 0 comments · Fixed by #38

Comments

@jaume77
Copy link

jaume77 commented Apr 16, 2021

In the /migratehvp2h5p/cli/migrate.php file a sql query with "LIMIT" is used.

In DB Oracle, it doesn't work.

I think that the Moodle function $DB->get_records_sql is already prepared to be able to define a limit, so that the code could perhaps be changed from:

if (!empty($limit)) {
    $sql .= " LIMIT " . $limit;
}

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

to

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

(I think $limit is instantiated at this point)

Greetings

doctorlard added a commit to catalyst/moodle-tool_migratehvp2h5p that referenced this issue Aug 3, 2021
doctorlard added a commit to catalyst/moodle-tool_migratehvp2h5p that referenced this issue Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant