Answer the question
In order to leave comments, you need to log in
How to attach users to projects?
There is a users table, there is a projects table in sql. It is necessary to make sure that a certain project would be under a certain user. How to do it?
Answer the question
In order to leave comments, you need to log in
users <---> projects
does one user have one project? one-to-one
one user has more than one project? one-to-many
many users per project? many-to-one
each user can have more than one project, and one project can have more than one user? many-to-many
Add the user_id field to the projects table and write the user id from the users table there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question