I have three tables:
COUNTRIES:
id_country
---
---
---
CITIES:
id_city
id_country
---
---
---
CENTERS:
id_city
--
--
--
How can I show the country, the city and the center information in the edit/view screen if CENTERS is the selected table? any suggestion?
try this:
public function countries()
{
try{
$crud = new grocery_CRUD();
$crud->set_table('contries');
$crud->set_subject('Conutries');
$crud->set_relation_n_n('countries', 'cities', 'countries', 'id_country','id_city','city');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
I hope this helps