I have to calculate a specific variable for a user logged according to his groups of membership.
I try to do it with this code but $query1 part seams to doesn't work (if I replace $result1 by a list of group id in $query2, it works as I want).
[email protected]@USER_LOGGED;//user_uid of user logged
$query1= "select distinct GRP_UID from GROUP_USER where USR_UID=$UserID";//groups of user logged
$query2= "select distinct GRP_TITLE, GRP_UID from GROUPWF where GRP_TITLE like '$reglenommage%' and GRP_UID in($result1)";//groups matching to namerule within groups of user logged
$GroupTitle=$result2['GRP_TITLE'];//first result matching
$region = substr($GroupTitle, 11, 6);//truncate group name
Could you help me, please ?