|
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]
|