MDL-19057 simplified fake conditions, no need to bind params here

This commit is contained in:
Petr Skoda 2010-09-14 19:19:30 +00:00
parent 4a8b5434e5
commit b968cf3501

View File

@ -946,8 +946,8 @@ abstract class moodle_database {
public function get_recordset_list($table, $field, array $values, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
list($select, $params) = $this->where_clause_list($field, $values);
if (empty($select)) {
$select = '? = ?'; /// Fake condition, won't return rows ever. MDL-17645
$params = array(1, 2);
$select = '1 = 2'; /// Fake condition, won't return rows ever. MDL-17645
$params = array();
}
return $this->get_recordset_select($table, $select, $params, $sort, $fields, $limitfrom, $limitnum);
}