I have two tables, products and categories.
Products table looks like this:
- id
- productName
- category_id
Categories table looks like this:
- id
- category_name
My function looks like this:
function products()
{
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('products');
$crud->set_subject('Store Products');
$crud->set_relation('category_id','categories','category_name');
$output = $this->grocery_crud->render();
$this->load->view('admin/crud',$output);
}
But when I load either the list or edit view, I am only seeing the category ID number. No dropdowns, etc.
Any help would be greatly appreciated! Thanks!