🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #431

Re: Multiple users in mysql

#431
From: Landim
Date: Thu, 11 Oct 2001 14:48
42 lines
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
Technical Details
Message-ID: <3bc5afa9_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3bc45f29.26884224@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,6029300822978c9b
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-10-11 07:45:50 PST
Reply-To: "Landim" <landim2@terra.com.br>
From: "Landim" <landim2@terra.com.br>
Newsgroups: borland.public.cppbuilder.database.multi-tier
References: <3bc45f29.26884224@newsgroups.borland.com>
Subject: Re: Multiple users in mysql
Date: Thu, 11 Oct 2001 11:48:00 -0300
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 200.167.239.81
Message-ID: <3bc5afa9_2@dnews>
X-Trace: dnews 1002811305 200.167.239.81 (11 Oct 2001 07:41:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews