Hello GC Team,
I am new user of GC and started working on it since yesterday only.
I am facing Internal Server Error (500) issue while adding/mapping new entry.
I have three tables.
1. operators (Fields: id,operator_name)
2. circles (Fields: id,circle_name)
3. operators_circles (This is mapping table. One operator may belongs to multiple circles) (Fields: id,operator_id,circle_id,priority)
CI Methods:
public function operator - working fine
public function circle - working fine
public function operator_circle - not working fine (It is a mapping method. Single operator may belongs to multiple circles.)
Method definition of operator_circle:
public function operator_circle() {
$crud = new grocery_CRUD();
$crud->set_table('operators');
$crud->set_relation('id', 'operators', 'operator_name');
$crud->set_relation_n_n('circle_name', 'operators_circles', 'circles', 'operator_id', 'circle_id', 'circle_name', 'priority');
$crud->set_subject('Operator-Circle Mapping');
$crud->display_as('id', 'Operator Name');
$crud->display_as('operator_name', 'Operator Name');
$crud->display_as('circle_name', 'Circle Name');
$crud->fields('id', 'circle_name');
$crud->columns('operator_name', 'circle_name');
$output = $crud->render();
$this->_load_view($output);
}
Just a note: Edit is working perfectly fine. That means i can click on edit button and can map operator with circle perfectly fine.
Only while adding/mapping new entry, it is not working and throwing internal server error 500 on firebug.
Can you guys please suggest if i am doing any mistake here?
Many Thanks in advance.