This topic is locked

Users seeing only their own data

1/28/2007 1:06:55 PM
PHPRunner General questions
kujox author

I have a project where the users can only see the data they enter.
one of the tables has a dropdown which pulls data from another table, this dropdown shows all the data in that table.
What is the session variable I need to put in the where clause to limit the dropdown to the users data only?
And if I have a dropdown which is custom, does this mean I wont be able to use the add new records on the fly?

J
Jane 1/29/2007

Hi,
here is a sample where clause:

"FieldName='".$_SESSION["OwnerID"]."'"



Also you can't use Add on the fly option and where clause together.

kujox author 2/1/2007

Thanks, I'd forgot I asked this question.
It's a pity the where clause and the add on fly don't work, is this also the case with the custom dropdown display field?

J
Jane 2/2/2007

Generally it's not possible. Add on the fly option doesn't work if you use Custom Exression in the Display field dropdown box.

You can send a description of your project, structure of the tables and relationships between these tables and I'll try to find a workaround.