|
Posted by Tom on 05/30/07 18:23
On 30 May 2007 10:19:57 -0700, ZeldorBlat wrote...
>
>On May 30, 1:05 pm, Gary Hasler <garyhas...@thelogconnection.com>
>wrote:
>> ZeldorBlat wrote:
>>
>> ...snip
>>
>>
>>
>>> > > I guess basically I'm asking: is there any way to restrict a mySql user;
>> > > > or to set a restriction on the table, beyond the built in mySql
>> > > > restrictions of SELECT, INSERT, etc.
>>
>> > > > For example: for user Joe_Blow, the restriction "WHERE `dealer` =
>> > > > 'Joe_Blow'" is added to every query? My question is evolving...am I
>> > > > looking for something like a "middle-man" between the mySql server and
>> > > > the client?
>>
>> > > If I understand what you are saying, the answer is no. You cannot make a
>> > > table in which certain fields are open only to certain people.
>>
>> > (Top-posting fixed)
>>
>> > No, but you can create a view that includes an appropriate where
>> > clause and give specific users select permission on the view.
>>
>> A 'view'--what is that?
>
>More information is available in the manual:
>
><http://dev.mysql.com/doc/refman/5.0/en/views.html>
>
>But the short answer is that they are saved queries that can be used
>just like tables. So you might create a view called "JoesQuotes" that
>looks like this:
>
>select *
>from quotes
>where dealer = 'Joe_Blow'
>
>And then grant Joe's user account select permissions on the view (but
>not on the quotes table itself). Then, from Excel, Joe can select
>from JoesQuotes and be restricted to his records.
>
Views are a great way to package up a query into a simple request. Very handy
for many purposes.
Tom
--
Internet Access $9.95 / mo. or $79.95 / yr.
http://newsguy.com/allinone.htm
Navigation:
[Reply to this message]
|