Hello guys, Can you help me please?
when I use session userdata and datetime in callback_insert/callback_update, and then I also use to set_relation_n_n. It can't be saved.
This my set_relation_n_n:
$crud->set_relation_n_n('category_island', 'island_category', 'table_category', 'id_island','id_category', 'category','queue_category');
This my callback_insert & callback_update:
function author_callback($post_array) { $data = array( 'id_user' => $this->session->userdata['id_user'], 'create_time' => date('Y-m-d H:i:s') ); $post_array['id_user'] = $data['id_user']; $post_array['create_time'] = $data['create_time']; return $this->db->insert('island',$post_array); } function author_callback2($post_array) { $data = array( 'id_user' => $this->session->userdata['id_user'], 'create_time' => date('Y-m-d H:i:s') ); $post_array['id_corrector'] = $data['id_user']; $post_array['create_time'] = $data['create_time']; $this->db->where('island.id_island',$this->uri->segment(4)); $this->db->update('island',$post_array); return TRUE; }
when not use callback_insert/callback_update or set_relation_n_n, then it works fine.