db->query($sql); $row = $rs->fetchAll(\PDO::FETCH_COLUMN); return $row; } public function readFields($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); } }