diff --git a/application/module/Westdc/Visual/DataTableControl.php b/application/module/Westdc/Visual/DataTableControl.php index cb105990..c0d5bc75 100644 --- a/application/module/Westdc/Visual/DataTableControl.php +++ b/application/module/Westdc/Visual/DataTableControl.php @@ -27,7 +27,8 @@ class DataTableControl extends Database{ public function readFields($tableName) { - $sql = "select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='$tableName'"; + $st=explode('.',$tablename); + $sql = "select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where table_schema='".$st[0]."' and TABLE_NAME='".$st[1]."'"; $rs = $this->db->query($sql); return $rs->fetchAll(\PDO::FETCH_COLUMN); }