简体   繁体   中英

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

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:

function _example_output($output = null)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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