public function getTable($name) { $this->db = new Database(DB_SERVER, DB_USER, DB_PASS, $this->data_base_name); $this->db->connect(); $sql = 'DESC ' . $name; $rows = $this->db->fetch_all_array($sql); $this->db->close(); $table = new DBTable($name); foreach ($rows as $rowData) { $table->AddColumn(new DBColumn($rowData)); } return $table; }