简体   繁体   English

杂货店CRUD始终不显示任何项目,但显示总数

[英]Grocery CRUD always showing No items to display but shows total count

I have a problem, that I am using Grocery CRUD and when I list the data, it always shows No items to display but it shows total number of records in table 我有一个问题,我正在使用Grocery CRUD,当我列出数据时,它始终显示No items to display但是却显示了表中的记录总数

Controller 调节器

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");
}
}

在此处输入图片说明

My table structure is 我的表结构是

在此处输入图片说明

i think you have no function for _example_output: 我认为您没有_example_output的功能:

function _example_output($output = null)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM