Answer the question
In order to leave comments, you need to log in
How to make an insert request?
I can't query the database at all. In general, to the point. There is a form It is
necessary to build a query so that it adds both fields with name="cat" to the table.
I did this, but the error...
INSERT INTO video_category(video_id, category_id) VALUES(:video_id, :cat, :cat)
Answer the question
In order to leave comments, you need to log in
So you insert 3 into 2 fields.
Rename the second input name to cat2.
INSERT INTO video_category(video_id, category_id) VALUES(:video_id, :cat)
INSERT INTO video_category(video_id, category_id) VALUES(:video_id, :cat2)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question