auto populate a column in another table
- Single Page
Posted 09 September 2016 - 02:21 AM
Posted 17 January 2017 - 14:46 PM
Use Triggers
Posted 17 January 2017 - 15:53 PM
@athar - can you please give an example on how to do this in CI?
Posted 17 January 2017 - 17:16 PM
What you want is not a difficult at all if you study grocery crud documents. Lets take the same Parent/Child example. Create a controller by the name of Family as follows.
public function Family()
{
$crud = new grocery_CRUD();
$crud->set_table('child');
$crud->columns('ID_child','ID_Parent','Child_Name');
$crud->set_relation('ID_Parent','Parent','Parent_Name');
$crud->set_subject('List of Children and their Parents');
$output = $crud->render();
$this->_example_output($output);
}
Posted 18 January 2017 - 06:58 AM
sorry my mistake :( my mind was floating when i wrote this question, i was thinking of a different scenario. hope didn't bother you much.
