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:
Aparup Banerjee 2010-11-18 06:00:51 +00:00
parent fa8f03efbb
commit 011bfd2a54
4 changed files with 153 additions and 11 deletions

View file

@ -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);
}