This topic is locked
[SOLVED]

 SQL inquiry using Field ='$_SESSION["Username"]' not working

1/23/2019 4:24:15 PM
PHPRunner General questions
ladykathleen author

I am pretty sure I not doing something right here. Would like some help.
I have a table and in the table people names are added to one field which would match their Username they log in with
I only want these people to see the entries that have their name and not the rest.
this is the Where part I tried to use but is not working
WHERE (Client-JO-Rec-Assign.RecuiterName ='$_SESSION["Username"]')
If I use Client-JO-Rec-Assign.RecuiterName ="Samantha Deleon" it shows but I need it to check by her Username she is logged in with Which is Samantha Deleon
I pretty positive it is the format I have wrong and hoping someone can point me in the right direction.

HJB 1/23/2019



I am pretty sure I not doing something right here. Would like some help.
I have a table and in the table people names are added to one field which would match their Username they log in with
I only want these people to see the entries that have their name and not the rest.
this is the Where part I tried to use but is not working
WHERE (Client-JO-Rec-Assign.RecuiterName ='$_SESSION["Username"]')
If I use Client-JO-Rec-Assign.RecuiterName ="Samantha Deleon" it shows but I need it to check by her Username she is logged in with Which is Samantha Deleon
I pretty positive it is the format I have wrong and hoping someone can point me in the right direction.


https://xlinesoft.com/phprunner/docs/advanced_security_settings.htm

ladykathleen author 1/23/2019

That will not work as it is not their own data but is data that is assigned to them.
One of the reasons this also does not work is all the groups they are in under permissions are set to Admin group (can see and edit all records)
I think I found what I was looking for..
= ':session.Username'

M
macalister 1/24/2019

Hello.
Maybe you can try this:
Go to events and add the following code on List page -> List page:Before SQL query

$strWhereClause = whereAdd($strWhereClause,"`Client-JO-Rec-Assign`.RecuiterName = '$_SESSION["UserName"]'");