moondance
06-06-2004, 07:48 AM
I was wondering if someone could give me some advice for the design of a section of a website to be used with mysql privileges.
From what i've understood, to enable this, you need to use the GRANT or REVOKE commands, which inserts the user into the mysql tables.
I have understood all this, and how to add/ remove privileges, but what i am unsure about is how to integrate this with the system i am developing.
At the moment, when the user logs in, a user object is populated with the users information from a few seperate tables. For the user to be able to have specific privileges, i understand i need to use their username and password that is in the mysql user table for every connection to a database. So here are my thoughts:
Should the username and password be the same for the user to access the area of the site as they are in the mysql user table, or should i store the username and password from the mysql user table as a seperate property of the object, and pass them to the mysql_connect function when database calls are needed?
Any advice is appreciated or comments are appreciated.
;)
From what i've understood, to enable this, you need to use the GRANT or REVOKE commands, which inserts the user into the mysql tables.
I have understood all this, and how to add/ remove privileges, but what i am unsure about is how to integrate this with the system i am developing.
At the moment, when the user logs in, a user object is populated with the users information from a few seperate tables. For the user to be able to have specific privileges, i understand i need to use their username and password that is in the mysql user table for every connection to a database. So here are my thoughts:
Should the username and password be the same for the user to access the area of the site as they are in the mysql user table, or should i store the username and password from the mysql user table as a seperate property of the object, and pass them to the mysql_connect function when database calls are needed?
Any advice is appreciated or comments are appreciated.
;)