Hi,

I've come up with an interesting problem and reading the MySQL book from DuBois hasn't 
helped me. I have the following scenario. A user can log in over the web to our site. 
Use the internet pages he can carry out functions that are provided by the pages. The 
user has access to three tables:
students, courses and st_course with the select, update, insert and delete privileges. 
This works fine. Here comes the trick. Everytime the user enters a new course, I want 
to create a new table for this course and the user has his "normal" rights to this 
table - but how?!

I have devloped this using roots priviliges so I know everything works. But how do I 
do this for the user? I have given him create, drop and alter priviliges for the 
database (he can't type in theses words so it is safe to do this). This means he can 
create, alter and drop the table but he can't look at what is in the table!

I'm busy writing a function that will use root's privileges to automatically grant him 
the privileges afterwards but this is not hte desired way, ie the user creates the 
table and automatically has his priviliges for this new table (the function does check 
that the table is unique so no security issue I believe).

I hope someone understands what I'm trying to say and knows the solution,

Thanks a lot in advance,

Pete

PS. I'm avoiding the easy but incorrect solution of giving select, etc. priviliges to 
the entire database - this is not hte desired behaviour.
______________________________________________________________________________
Fast alle Fluege koennen Ihnen egal sein. Einer nicht: Ihrer!
Flug.de hat ihn: http://flug.de/sb/?PP=0-0-100-105-3


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to