This topic is locked

$_SESSIONl'UserID']

2/5/2008 6:40:09 PM
PHPRunner General questions
Microe author

I am trying to generate a report where the records returned are selected with a particular field = to the username of the logged in user. I have edited the SQL Query for the report as such:
select `iWaitlist`,

`dStart`,

`dEnd`,

`vEliminated`,

`vElimOther`,

`tNotes`,

clients.iWaitListID,

`vAssignedTo`,

`vPriorityCode`,

`vProviderofChoice`,

`dWaitAssessDate`,

`dAssignedLOCD`,

`vOCAssigned`,

`vProviderAssigned`,

clients.iServicePtID,

clients.vLastName,

clients.vFirstName,

clients.vMiddleName,

clients.vSex,

clients.vCounty,

clients.vIntakeWorker,

clients.Status,

clients.vUserName

From `_WaitLog` waitlog

inner join _Clients clients

on waitlog.iWaitListID = clients.iWaitListID

where waitlog.vOCAssigned ='.$_SESSION["UserID"].'
[color=#000000]This does not return anything.
[/color] in the statement but nothing seems to work? What am I doing incorrect.

Alexey admin 2/6/2008

Mike,
you can not add PHP code on the Edit SQl qeury tab in PHPRunner.

Add your Where condition in the List page:Before SQL queryevent. using this code:

$strWhereClause = whereAdd($strWhereClause,"waitlog.vOCAssigned ='".$_SESSION["UserID"]."'");

Microe author 2/6/2008

Thanks Alexey, I thought that might be the case. Your solution worked well.
Mike