how to input multiple values and data at the same time ? |
So i have a problem with many to many relationship. Currently i have "surat" and "surat_user" table.
How do i insert data into surat and at the same time insert multiple values from select2 multiple form into surat_user table ? and how to get data so i can update it. I've seen some of other similar question but none of them suitable for my problem. I've tried using foreach to store the multiple values but it doesn't work With these codes below i get some error when i tried to input data "Object of class CI_DB_mysqli_result could not be converted to string" "Array to string conversion" "Cannot add or update a child row: a foreign key constraint fails" Model: Code: var $table='surat'; View: Code: <label class="control-label col-lg-2">Disposisi</label> Controller : Code: class SuratMasuk extends CI_Controller { |
Messages In This Thread |
how to input multiple values and data at the same time ? - by keishaadora - 01-01-2019, 11:44 AM
RE: how to input multiple values and data at the same time ? - by Pertti - 01-02-2019, 02:26 AM
|