Ok here is my question…
I have a database of users and i want to be able to create a network that will allow you to search and add other users to your network what i am wondering is how to set that up in my users sql or do i need to create a new sql database.
any help or tutorials would be appreciated
need 3 tables at least and know how to use relational databases.
table 1 (users)
user_id, network_id, first_name, last_name, email, username, password
table 2 (networks)
network_id, network_name
table 3 (users_networks)
users_networks_id, user_id, network_name
example tables would look something like
users
1 | 2 | lucas | williams | email@email.com | simplistik | zomgwtfpasswordsha1
networks
1 | my first network
2 | my second network
3 | my third network
users_networks
1 | 1 | 2
2 | 1 | 3
so in all the tables the first number is auto_incremented, users_networks uses the auto_incremented id’s from users and networks to associate a user and it’s network. So in entry 1 of the users_networks table it says user #1 is associated with network #2 and network #3.