* Fix chart filter select item not display in screen.
This commit is contained in:
+7
-11
@@ -814,18 +814,14 @@ class screenModel extends model
|
||||
if($table) $options = $this->dao->select("id, {$field}")->from($table)->fetchPairs();
|
||||
}
|
||||
break;
|
||||
case 'string':
|
||||
if($field)
|
||||
default:
|
||||
if($field && $sql)
|
||||
{
|
||||
if($sql)
|
||||
{
|
||||
$cols = $this->dbh->query($sql)->fetchAll();
|
||||
foreach($cols as $col)
|
||||
{
|
||||
$data = $col->$field;
|
||||
$options[$data] = $data;
|
||||
}
|
||||
}
|
||||
$options = $this->dao->select("tt.`$field`,tt.`$field`")
|
||||
->from("($sql)")->alias('tt')
|
||||
->groupBy("tt.`$field`")
|
||||
->orderBy("tt.`$field` desc")
|
||||
->fetchPairs();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user