Best unofficial Apache Server developers community |
|
I need to create a basic database for user authentication. So far, every user has a name, a password and a role. I've found this somewhere on the Internet, which looks quite promising:
But... if I would create new users, how would I fill the
posted via StackOverflow
|
|
 
|
For each user, you simply insert one row in the user_roles table for every role you want to assign to that given user. There's nothing automatic about it. It's a many-to-many relationship. |
![]()  
|
You would first populate the
This is done for a "Many To Many" relationship. It's also called "Normalizing" your database. |