Hi,
I would like to ask for some help or maybe someone out there could point me to the right direction.
I am new to using Grocery Crud and I have just started using GC on my project.
What I am trying to do is to only show all items NOT marked as deleted so my table has a field called 'is_deleted' which have a default value of '0'.
I have added an additional where condition on my GC instance:
$crud = new grocery_CRUD(); $crud->where('is_deleted', '0', true); $crud->set_table($this->db->dbprefix('item'));
When the page first loads, it only shows all items that are not marked as deleted. Which is working as expected.
And on the list page, this option is not shown as a filter and should be hidden and default on the back-end.
But when I start searching/filtering items the problem occurs.
E.g: Search keyword is "test" and field is "ALL". GC returns all items from the table without applying any "where" condition as seen from the result being returned.
Please also note that this only happens when the field selected is "ALL" but not when I set the field to a specific field the filtering works correctly.
Any help/suggestion is highly appreciated.
Thank you.