Filter records when creating relationships?
- Single Page
Posted 09 December 2011 - 12:55 PM
Posted 09 December 2011 - 19:29 PM
I am using a flag to mark a record is deleted as opposed to actually deleting the record from my table. Is it possible to use a query instead of a table? or how can I fetch [using a relationship/join] only the records having Active=1?
[/quote]
For a custom query you can use the set_model http://www.grocerycrud.com/crud/function_name/set_model . Now for the fetching you can simply have the where. Just type
$this->grocery_crud->where('active','1');
and you are ready ;-)
Posted 10 December 2011 - 08:02 AM
I am trying to use it in a test project, and so far am very happy with what I was able to achieve with this, thanks for this sharing this wonderful tool with the community.