First of all, search the web for a tutorial on basic SQL and database 
design. There are lots out there, and most are good. It's important to work 
through this stuff and get a handle on it. I believe there are good ones at 
DevShed and WebMonkey.

Secondly, this is really a MySQL question and properly belongs on the MySQL 
list.

Thirdly, you're on the right track. A unique key value for each client will 
ensure that they will see only their data, particularly if they never see 
that value on a web page. Session would be the way to go.

Fourthly, you don't want a set of tables for each client, but you've 
probably figured that out by now.

Fifthly, join the list! It's busy and informative.

Cheers - Miles

At 05:13 PM 8/14/01 -0700, o o wrote:
>I'm relatively new to MySQL and am drawing up some ideas for writing a
>support/trouble tracking database for my company. I envisioned a single
>database with seperate tables for various data I would be storing
>(IP/Connection info table, Machine Inventory Table, etc). Each table would
>have data for all the clients, and each client would have their own login
>(via web/php) to view their information. However, it doesn't seem that I can
>restrict a given mysql user to access only those rows of data that are
>relevant to their company. It seems that I can only restrict user access to
>certain tables, which would seem that I would have to have a seperate table
>per client/company. This doesn't seem to be an ideal way of storing the data
>I would be collecting though. Is there some other means of restricting
>access in the desired way or am I being too ambitious in my goals of having
>the client data accessible via a per user/login basis? The other thought I
>had was of setting cookie/session variable with the client id (unique) at
>login. Then all requests for data would be validated since each row of data,
>regardless of table, would have the client id as one of the keys. Would this
>work or be too much overhead? Is there a better way of doing this? Thanks
>for your time.
>
>PS. If you could copy me on your replys that would be great as I am not
>currently subscribed to the list.
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to