I am working on a projecj with codeigniter, and it's my first time using GroceryCRUD, and I need to make that a patient can have any number of reports, I have this on my database.
Where idpatients is the foreign key.
I am using this on my controller
public function reports()
{
$crud=$this->grocery_crud;
$crud->set_table('reports');
$crud->set_subject('Reports');
$crud->set_language('english');
$crud->set_relation('idpatients','patients','Patient');
$output=$crud->render();
$this->load->view('admin_reports', $output);
}
And I get this error
Any help would be appreciated to fix it, How can I declare the relationship so when I add a new report I can choose the patient from a dropdownbox or something?
UPDATE
When I change db_debug for false I get this error