The fixed filter is especially meant for purposes like this. As it is always applied over a query, even select * will be filtered because of the fixed filter. The limitation to fixed filter is that the end user cannot manipulate it by entering some kind of weird query like there are hacks who allow that. PHsPeed has many security measures, but as fixed filter cannot be manipulated by the regular PHsPeed functions (except by setFixedFilter function) you can set the filter that always needs to apply to this value.
Example:
- on login select the farm id and save it in the session space (setSessionVar('myFarm', "myfarm='".$myVar."');
(the where clause will be appended, result could be: myfarm='12'
- in the onCreate event of the Form, set the fixedFilter (setFixedFilter("myfarm='".getSessionVar('myFarm', '1=0');
The 1=0 will cause the query to give no results when no valid farm is available.
Hope this helps.
Chris.