This topic is locked
[SOLVED]

 error straight from Help document code??

2/13/2012 2:25:56 PM
PHPRunner General questions
W
wildwally author

I've been running into a lot of problems lately and I'm sure most of it is user error; however, in my attempts to try creating a page that would contain multiple views on one page with failure; I decided to step back and just try the basics. So I create a custom view and wanting to use the before SQL Query function.
I found this code in the Help file:



if Session("UserID")<>"admin" then
strWhereClause = whereAdd(strWhereClause, _
"DATEDIFF(day,GETDATE(),DateColumn)<=7")
end if


But with the two modification I get error on something I didn't have to change. So once again I take it back to the basics and still get error with these modifcations:



if Session("MyUserID")<>"1" then

strWhereClause = whereAdd(strWhereClause, _

"DATEDIFF(day,GETDATE(),QuoteRequestDate)<=7")

end if


I get a syntax error, unexpected T_STRING, expecting '(' in line 1
What gives?
What I'm trying to do is filter the user's data and their last 20 entries on this table. If we could just cut to the chase that would be great too.
And since I've got your attention How would I go about getting my echo results from a query to populate within a table to the left a list page? If there is any good refrence material you guys use to that outlines some of the basics I think I need to know can you share that, so i can read up on it.

Sergey Kornilov admin 2/13/2012

That what happens when you paste code from ASPRunnerPro manual to PHPRunner events.

W
wildwally author 2/13/2012

The $ missing might have been a dead ringer. Sorry "embarrassed", not sure how I ended up with the ASP help open.