我有一个问题,我正在使用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");
}
}
我的表结构是
答案 0 :(得分:0)
我认为你没有_example_output的功能:
function _example_output($output = null)
{
$this->load->view('"name of your view".php',$output);
}