This my code...
public function pedidos()
{
$crud = new grocery_CRUD();
$crud->set_relation('idpedido_estado','pedidos_estados','nombre'); //This doesn't work
$crud->set_relation('idusuario','usuarios','username'); //This works great!
$crud->set_table('pedidos');
$output = $crud->render();
$this->_example_output($output);
}
It renders a table with 'idpedido_estado' field empty and 'idusuario' field ok.
I put a var_dump($this->relation) here .... 'grocery_CRUD_Model.get_list()' and I can only see one row, not two!
array(1) { ["idusuario"]=> array(3) { [0]=> string(9) "idusuario" [1]=> string(8) "usuarios" [2]=> string(8) "username" } }
I tried to figure it out, but I can't.
Can anyone help me?
Thank you!
Mario