I am trying to set a relation but I want to filter the results from the relation table based on the value of the primary key in the source table. I thought I could use get_primary_key() in some way but have hit a dead end with it.
By way of illustration;
[size=3][font=courier new,courier,monospace]source_table
source_id, relation_field
relation_table
relation_id, relation_name[/font][/size]
I want something like this on source_table;
$this->grocery_crud->set_relation(
'relation_field',
'relation_table',
'relation_name',
array('relation_id' => source_id)
);
Hope this makes sense! Thanks in advance.
Cheers,
Geoff