You are here: Re: How do I give dealers access to only their records « PHP SQL « IT news, forums, messages
Re: How do I give dealers access to only their records

Posted by Gary Hasler on 05/30/07 17:38

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.

Right on!..this sounds like EXACTLY what I need...I mean exactly!
Guess I need to upgrade my tables to Mysql 5 (should have done it long
ago really).

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация