I have 2 table:
Table_A: a_id, a_name, a_unsigned_name
Table_B: b_id, b_name, a_id
When i using crud, how i can get my column like this: b_id, b_name, a_name, a_unsigned_name
Below is my example code:
$crud = new grocery_CRUD(); $crud->set_table('Table_B'); $crud->set_subject('Table B'); $crud->columns('b_id', 'b_name', 'a_id', 'a_unsigned_name'); $crud->set_relation('a_id', 'Table_A', 'a_name');
Now my result: a_unsigned_name column is null.
I try with below code but it's been overid a_name:
$crud = new grocery_CRUD(); $crud->set_table('Table_B'); $crud->set_subject('Table B'); $crud->columns('b_id', 'b_name', 'a_name', 'a_unsigned_name'); $crud->set_relation('a_id', 'Table_A', 'a_name'); $crud->set_relation('a_id', 'Table_A', 'a_unsigned_name');
I have a question for everybody: How i can get value for a_unsigned_name column at Table_A.a_unsigned_name ?
I try find more way to resolve it but unsuccessful :(. Can you help resolve it?