skye 发表于 2014-10-22 12:42:30

表格输出函数中怎么增加一列删除

问题:最后一列操作是要自己追加上去的应该怎么操作???
主要代码如下:
controller:
    $this->load->library('pagination');
    $config['base_url'] = site_url('user/index');
    $config['total_rows'] = $this->db->count_all('user');
    $config['per_page'] = 5;
    $config['uri_segment'] = 3;
    $this->load->model('user_model');
    $data['results'] = $this->user_model->get_users($config['per_page'],$this->uri->segment(3));
    $this->load->library('table');
$this->table->set_heading('编号', '姓名', '操作');
model:
    function get_users($num, $offset) {
         $query = $this->db->get('user', $num, $offset);      
         return $query;
    }
view:
<?php echo $this->table->generate($results); ?>
<?php echo $this->pagination->create_links(); ?>

页: [1]
查看完整版本: 表格输出函数中怎么增加一列删除