PDA

View Full Version : paid access to MySQL fields


russia5
08-19-2005, 07:24 PM
The normal web surfer to my site gets access to data in part of my table. When the user logs in, I would like him to get access to the other fields. Pay membership programs, such as amember, dreamaccounts etc use HTACCESS securing files. I have not run accross one that can secure fields. To my mind, there are two ways of doing it: First, you can make a table and a query and change out the connections via php on login (does anyone no of an existing pay membership appl that can do this; Second, and I don't know if this is possible, but possibly the use of MySQL privledges to do this. More specifically, column_priv. I believe there is a View function that one may be able to use. Does anyone know if this can be done. It is the perferable way for me.

raf
08-21-2005, 05:44 PM
welcome here!

why don't you dynamically build your query inside your applicationlayer (PHP, ASP, JSP,...?) based on the users profile?

if you woul use a seperate MySQL accoutn for the two types of users, than you'd still need to decide inside your applicationlayer which account you'll use (based on the userstype) so there's not much added security (if at all) is using mltiple MySQL accounts for this.