error/moodle/invalidqueryparam: Difference between revisions
From MoodleDocs
(New page: Amy Stack Page '''interactive Media''') |
Tim Bahula 2 (talk | contribs) (Restored) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[ | {{stub}} | ||
''' | |||
[[Category:Error|Invalidqueryparam]] | |||
One possible cause of this error is a call like | |||
<code> | |||
$DB->get_records_sql($sql, $params) | |||
</code> | |||
where the SQL query, $sql, contains several '?' which are to by substituted by $params, | |||
but fewer parameters than '?' are supplied. | |||
Check that $params was not created using unexpexted NULL values. | |||
get_records_sql() is defined in 'lib/dml/*_native_moodle_database.php', depending on which database you are using. | |||
[[es:error/moodle/invalidqueryparam]] |
Latest revision as of 15:28, 24 March 2022
One possible cause of this error is a call like
$DB->get_records_sql($sql, $params)
where the SQL query, $sql, contains several '?' which are to by substituted by $params, but fewer parameters than '?' are supplied. Check that $params was not created using unexpexted NULL values. get_records_sql() is defined in 'lib/dml/*_native_moodle_database.php', depending on which database you are using.