can anyone help me on how to submit multiple rows in one submission?
this survey form will display a set of skill that derived from table skill. the teacher will hav
Another simple approach for inserting multiple records is an INSERT .. SELECT
. (It is also mentioned in the link banyr posted). Because the skill id's are stored in another table, you can use an IN
clause to SELECT
them. Then insert those values directly into your other table studenSkill
with a simple query, no looping.
INSERT INTO studenSkill ( studenId, skillId )
SELECT
, skillId
FROM skill
WHERE skillId IN
(
)
BTW, in case that is not a typo, do not forget the # signs around the query column name ie "skillid"