Hi all,
Still struggling with a sort of old question. Insert checked values to new table.
I have three tables.
-
student ( id, name,gender)
-
subject ( id, name)
-
allocation (id,student_id,subject_id)
I want to allocate students for subjects. I tried to use many to many relation, but it is difficult to handle many to many in yii. Therefore I used following method;
- Create grid with " student_id(hidden), subject_id(hidden), student name (searchable), student gender(searchable), subject name ( searchable), checkbox"
Succeed with above step, now I need to insert selected student_ids and activity_ids to table ‘allocation’ as new records.
I tried with several ways including dhtmlxgrid. But still not success.
It’s really appreciate if some one can help to do this task ( insert selected student_ids and activity_ids to table ‘allocation’ as new records).