Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages
Started by Reynold M. de Guzman
Wed, 10 Oct 2001 14:46
Multiple users in mysql
Author: Reynold M. de Guzman
Date: Wed, 10 Oct 2001 14:46
Date: Wed, 10 Oct 2001 14:46
24 lines
1454 bytes
1454 bytes
Hello, Does anyone know how to restrict record access in a table depending on the admin name. For example there is table called "scratchpad" and there is a field called "admin". I want everyone with a name in the admin tab to be able to insert a record but I want the users to only be able to edit or delete records with their name in the "admin" field. Can this be done or should I make a separate table for each user? There may be thousands of users and each user would then have about 5 tables. Thanks for any help. Reynold --- Reynold M. de Guzman deguzman@offworldcolony.com
Re: Multiple users in mysql
Author: Landim
Date: Thu, 11 Oct 2001 14:48
Date: Thu, 11 Oct 2001 14:48
42 lines
2092 bytes
2092 bytes
"Reynold M. de Guzman" <deguzman@offworldcolony.com> escreveu na mensagem
news:3bc45f29.26884224@newsgroups.borland.com...
> Hello,
>
> Does anyone know how to restrict record access in a table depending on
> the admin name.
>
> For example there is table called "scratchpad" and there is a field
> called "admin".
>
> I want everyone with a name in the admin tab to be able to insert a
> record but I want the users to only be able to edit or delete records
> with their name in the "admin" field.
>
> Can this be done or should I make a separate table for each user?
> There may be thousands of users and each user would then have about 5
> tables.
>
> Thanks for any help.
>
> Reynold
>
>
> ---
> Reynold M. de Guzman
> deguzman@offworldcolony.com
All you have to do is insert if there is name, right? So the idea is...
insert on scratchpad (myrow) values (myvalues) where (select * from
scratchpad where admin = "var");
BUT
insert does not accept where ...
so you can make a transaction or try mask(filter,restriction) options of the
row you are using...
landim2@terra.com.br
Re: Multiple users in mysql
Author: Reynold M. de Guzman
Date: Fri, 12 Oct 2001 14:11
Date: Fri, 12 Oct 2001 14:11
41 lines
2131 bytes
2131 bytes
On Thu, 11 Oct 2001 11:48:00 -0300, "Landim" <landim2@terra.com.br> wrote: > >All you have to do is insert if there is name, right? So the idea is... > >insert on scratchpad (myrow) values (myvalues) where (select * from >scratchpad where admin = "var"); > > BUT >insert does not accept where ... > >so you can make a transaction or try mask(filter,restriction) options of the >row you are using... > > >landim2@terra.com.br > > I can use the filters, and programatically allow inserts, edits, deletes from withing the program using sql and filters and such but I was wondering if someone with a "real" login/password AND has or built their own database tool can access the database and insert/edit/delete records of other rows that have a different admin name. I'm thinking this has to be done at database level. Do you know if this can be done with mysql? Specifically: User name "test1" should be able to insert/edit/delete records with his user name in the admin field. User name "test2" should not be able to do anything to the rows with "test1" in the admin field. Reynold --- Reynold M. de Guzman deguzman@offworldcolony.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads