CI_Table::_set_from_db_result PHP Method

_set_from_db_result() protected method

Set table data from a database result object
protected _set_from_db_result ( $object ) : void
return void
    protected function _set_from_db_result($object)
    {
        // First generate the headings from the table column names
        if ($this->auto_heading === TRUE && empty($this->heading)) {
            $this->heading = $this->_prep_args($object->list_fields());
        }
        foreach ($object->result_array() as $row) {
            $this->rows[] = $this->_prep_args($row);
        }
    }