Postingan lainnya
Query sql insert ke 2 tabel
bagimana cara memasukkan data berbentuk array ke dalam 2 tabel ??????? data nya : $data = array( 'id_product' => $params['product'], 'id_user' => $params['user'], 'discussion' => $params['discussion'], 'created_at' => date('Y-m-d H:i:s') );
0
2 Jawaban:
logika saya tapi error: $this->db->query('INSERT INTO tbl_discussion_cdlk(id_product,id_user) OUTPUT INSERTED.'$data' INTO tbl_replay_discussion_cdlk(id_product,id_user,discussion) VALUES.'$data); return array('errorCode' => 200,'userMessage' => 'Data has been created');
0