mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-55660-master-tablesql' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
ba982fef66
@ -1598,7 +1598,8 @@ class table_sql extends flexible_table {
|
||||
function out($pagesize, $useinitialsbar, $downloadhelpbutton='') {
|
||||
global $DB;
|
||||
if (!$this->columns) {
|
||||
$onerow = $DB->get_record_sql("SELECT {$this->sql->fields} FROM {$this->sql->from} WHERE {$this->sql->where}", $this->sql->params);
|
||||
$onerow = $DB->get_record_sql("SELECT {$this->sql->fields} FROM {$this->sql->from} WHERE {$this->sql->where}",
|
||||
$this->sql->params, IGNORE_MULTIPLE);
|
||||
//if columns is not set then define columns as the keys of the rows returned
|
||||
//from the db.
|
||||
$this->define_columns(array_keys((array)$onerow));
|
||||
|
Loading…
x
Reference in New Issue
Block a user