Answer the question
In order to leave comments, you need to log in
MySql database, how to make a variable with individual value for all accounts?
Good evening.
There is a site with account management through a MySQL database. It is necessary to create the ability to change the variable on the site by the account id, so that it would be possible to change it for different users. If there is such an opportunity without interactions with the database, then I will also be glad to help. Thank you!
Answer the question
In order to leave comments, you need to log in
Well, actually, a special service table is usually created for such purposes.
What you are describing so strangely, if I understand the essence correctly, is called ACL or RBAC, depending on the purpose and logic of the application.
If for some reason you don’t want to create a table for data,
then you can use a view or a stored procedure in which you literally write all the values \u200b\u200bfrom the user (or any other conditions)
SELECT CASE
WHEN USER() =='[email protected]' THEN 1
...
ELSE 0
END
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question