⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery Crud Relation n_n got error



Indra John
  • profile picture
  • Member

Posted 22 February 2017 - 21:44 PM

Hi,

 

I'm getting an error when doing insertion to a crud which has set_relation_n_n.

 

  • When I insert: I get "An Error Has Occurred on Insert"
  • When I update: All other information on the table gets updated with an exception of the n_n relation. I can delete items from the n_n, but I can not add new ones. 

What could be the cause of this error?

 

this is my code for relation n_n

public function halteBTS()
    {
		try{
			$crud = new grocery_CRUD();
			$crud->set_table('tbl_halte');
			$crud->set_relation_n_n('koridor','tbl_ref_koridor_halte','tbl_koridor','id_halte','id_koridor','nama_koridor');
			$output = $crud->render();
			$this->output($output,"Manajemen Halte BTS");
		}catch(Exception $e){
			show_error($e->getMessage().' --- '.$e->getTraceAsString());
		}
    }

the firebug output is on attach file..

thanks