This topic is locked

pre-select query

4/7/2009 4:15:44 AM
PHPRunner General questions
K
kenny_robb author

I am trying to focus the security a touch more and was wondering if it is possible to do a pre-select on tables, views and reports.
My thought would be to have the query as part of the user details held in a table with the user details. When the user logs in I would select the query and assign it to a global variable.
for example
USER - KENNY

PW - XXXXXXXXX

QUERYSTRING - Select * from table1 where country in (UK,USA,FR)
assign QYERYSTRING to Global Variable
Can I now take that variable and use it to limit what the user can see accross the tables, views and reports.
Thanks in anticipation
Kenny

J
Jane 4/7/2009

Hi,
in general it's possible.

But this task requires a lot of custom coding in the Before SQL query eventz. You need to select your queries and replace it with main queries.

Unfortunately we don't have a ready to go solution for this.