This topic is locked
[SOLVED]

 User dependent(conditional) SQL statement / v 5.1

4/27/2010 11:43:14 AM
PHPRunner General questions
O
olegsg author

Hi
I would like to arrange that each user is able to see table details "related" to him only.
For example, I'm a car dealer for many brands (GM, Volvo, Toyota) and I have

"Sales" table having following columns
Brand

carModel

salesDate

salesPlace

salesPrice
Instead of making particular view for representative of each brand I would like

to PHPRunner execute conditional Select statement based on logged in user name.
For example, for user "GM" PHPRunner to execute following query:
SELECT * FROM SALES WHERE Brand IN ('GM');
Any ideas ? Thank you in advance.

Sergey Kornilov admin 4/27/2010

Olegsg,
take a look at this article that explains how you can modify SQL Query dynamically for each user:

http://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm

O
olegsg author 4/27/2010



Olegsg,
take a look at this article that explains how you can modify SQL Query dynamically for each user:

http://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm


Thank you