i learned that its better not to mix tables, i mean if you have users table, dont add cart stuff info into it, will make it hard in the future to read the table, and you wont understand why you added that info into the users table.
the question is what clients are? non users, just visitors or users as well?
if they are users, you should make clients table, with unique id
, user_id
, client_id
,
very basic table that will allow you to get the number of clients that user have, and in the future you can add more columns into the table like, items_bought
and much more, you should do that if a user will get multi clients, witch i think is the case.
but if each user will have 1 client (i dont think its the case), you can add column into the user table client_of
but then you can't store multi clients, only one.
so for the future, dont mix tables, each "theme" should have its own table, in my opinion of course.
P.S you have many options when you have 2 tables, so dont add the same attr to both of the tables, add all the info of the users to the users table, if you need the user info of a client, get his id from the client table and then get the info from the users table, but if you need an info that only clients need, then add that attr to the client table.
edited: quick example :
users table:
`id` `first_name` `last_name` `username` `password` `date`
`1` `alex` `maya` `alex.maya` `pass12` `yesterday`
`2` `bob` `smith` `bob.smith` `pass43` `today`
the client table:
`id` `user_id` `client_id`
`1` `1` `2`
`2` `2` `1`
this tables says that alex bought from bob and bob bought from alex, lets say i'm bob, and i want to see the info of the user that bought from me:
$sql = "SELECT client_id FROM clients WHERE user_id = {$user_id}"; // output = the id of the users who are his clients.
`