grocery-crud icon indicating copy to clipboard operation
grocery-crud copied to clipboard

Codeigniter Database Cache and Grocery Crud

Open shahmir opened this issue 11 years ago • 4 comments

I am using grocery crud in my codeigniter project. It was working fine until I switched on "Database Caching".

Rest of project still works fine but I get following error whenever I open grocery crud controller

Fatal error: Cannot access empty property in pathToProject\application\libraries\grocery_crud.php on line 1441

querycache

shahmir avatar Oct 10 '13 12:10 shahmir

similar problem, Urgent help required. as soon as i enable database caching i get error on Filename: /home/vproud/public_html/models/grocery_crud_model.php

Line Number: 87

harpreetsb avatar Jun 27 '14 09:06 harpreetsb

Hi i m also getting same error.. Please fix this ASAP. we are not able to use database cache in application

raviraiya avatar Jul 21 '14 05:07 raviraiya

Hi i found solution of this problem. you need to use following code :
$crud->set_primary_key('primery_key_name','tablename');

like i have a task table : $crud->set_primary_key('task_id','task');

you need to define which is your primary key in your table

raviraiya avatar Jul 21 '14 05:07 raviraiya

This bug still exists, I have been able to still have caching for the rest of the application by adding $this->db->cache_off(); in the grocery_crud_model.php file.

PaulKish avatar Mar 31 '17 07:03 PaulKish