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 peter on 05/29/07 16:56

> Newbie warning--I'm ok with PHP but my SQL knowledge is limited.
> I want to allow our dealers access to our database of price quotes, but
> only to their own records. The table has a field "dealer", so for
> example dealer "Joe_Blow" should only be able to read records where that
> field has that value.
>
> Currently I use MS Excel to do a query thru ODBC. I can easily set up a
> new MySQL user for each dealer with our web site host's "control panel"
> tools, but cannot set the above mentioned restriction. I could write my
> own custom PHP interface, but I'm sure this wheel has already been
> invented, and I would rather not add more pages to our web site. Can
> someone point me in the right direction?

You simply need to use a where clause in your sql:-

http://dev.mysql.com/doc/refman/5.0/en/select.html so on the end of your sql
you would have something like WHERE `dealer` = 'Joe_Blow'

 

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

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