Answer the question
In order to leave comments, you need to log in
How to add an entry with a many to many relationship?
Good day!
There are three tables:
day_table, task_table, day_task
Day_table stores days, and you need to link tasks to them that are added to task_table using many to many links. I have already set up connections in the database, but here's how to make a query so that when I insert a task, the day_id value (I know it) and task_id are written to the day_task table? Is there any way to find out what id the record received by the results of INSERT?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question