I have an mySQL database for a 3rdparty application. One of the tables in this database is called Users.
There is a field in this table called USR_Role
I would like to query the Role field and if the user is a member of a particular role then set @@manager==1 else @@manager==0
Here is my current code:
$user = userInfo(@@USER_LOGGED);
$user1 = $user['Role'];
if ($user1 == 'AMA_NoTravelApproval'){
@@Manager==1;}
else
{@@Manager==0;}
I know very little PHP at this stage but when debugging within the application I do not get an error so unsure if the code has an error or the application is not applying it.
Aucun commentaire:
Enregistrer un commentaire