【问题标题】:Grocery CRUD always showing No items to display but shows total count杂货 CRUD 始终显示没有要显示的项目,但显示总计数
【发布时间】:2015-05-16 23:54:08
【问题描述】:

我有一个问题,我正在使用 Grocery CRUD,当我列出数据时,它总是显示 No items to display,但它显示表中的记录总数

控制器

class manage_home extends CI_Controller {

public function __construct() {
    parent::__construct();

    $this->load->database();
    $this->load->helper('url');

    $this->load->library('grocery_CRUD');
 }
    public function all_intro() {
   // echo "All is well";
    $crud = new grocery_CRUD();

    $crud->set_table('tbl_home_information');
    $crud->columns('pk_information_id','information_title','information_status','information_added');
    $crud->fields('pk_information_id','information_title','information_status','information_added');

    $crud->display_as('pk_information_id','ID');
    $crud->display_as('information_title','Title');
    $crud->display_as('information_added','Date');
    $crud->display_as('information_status','Status');

    $output = $crud->render();

    $this->_example_output($output, "Manage Brands");
}
}

我的表结构是

【问题讨论】:

    标签: php codeigniter grocery-crud


    【解决方案1】:

    我认为你没有 _example_output 的功能:

    function _example_output($output = null)
    
    {
        $this->load->view('"name of your view".php',$output);    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多