mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
database MDL-24863
- added restricting text conditions to where_clause , it throws a dml_exception when detected. - also added to where_clause throwing dml_exception for field that doesn't exist in table. - added unit tests for text condition restricting. - added 2 unit tests for set_field_select() testing 'auto-casting params to int problem' fix
This commit is contained in:
parent
fa8f03efbb
commit
011bfd2a54
4 changed files with 153 additions and 11 deletions
|
@ -335,7 +335,7 @@ class sqlite3_pdo_moodle_database extends pdo_moodle_database {
|
|||
if (is_null($conditions)) {
|
||||
return $this->execute("DELETE FROM {{$table}}");
|
||||
}
|
||||
list($select, $params) = $this->where_clause($conditions);
|
||||
list($select, $params) = $this->where_clause($table, $conditions);
|
||||
return $this->delete_records_select($table, $select, $params);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue