Filter records

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
acutri
User
Posts: 7

Filter records

Post by acutri »

PHPMaker 10, Mysql

All the tables in my database have a field 'myfield'.
The user table (tbuser) contains, for each user, a value of the field 'myfield', eg.: 'Myvalue'.
I wish that after authentication tables are filtered with the value 'myvalue'


mobhar
User
Posts: 11790

Post by mobhar »

Similar to this post: http://www.hkvforums.com/viewtopic.php? ... 567#p92327

For example:
function Recordset_Selecting(&$filter) {
ew_AddFilter($filter, "myfield = 'Myvalue'"); // Add your own filter expression
}


acutri
User
Posts: 7

Post by acutri »

All db tables must have the filter 'myvalue'. The function Recordset_Selecting (& $ filter) is Table-specific
In addition, the value 'myvalue' must be read from the table tb_user at login


mobhar
User
Posts: 11790

Post by mobhar »

Then you should read "Tutorial - Advanced Security - User ID Security" in the help file.


Post Reply