This topic is locked
[SOLVED]

 BeforeQuery + Search

10/1/2014 10:37:16 AM
PHPRunner General questions
S
sgchan author

Hi,

I have the below additional Where condition in my List page under BeforeQuery:

$strWhereClause="grant_period1='".$_SESSION["current_period"]."'";
This works fine and the listed is correctly filtered.
However, the Search does not work anymore. If I comment out the above line, Search works just fine.
Is this the way it is meant to work? If so, could you offer some advice on how you could have both working in tandem?
Many thanks in advance.

p.s. - I am using build #16275

Sergey Kornilov admin 10/1/2014

Your code replaces the WHERE clause while it should keep the existing one and add one more condition.
You need to use the corresponding example from the manual:

http://xlinesoft.com/phprunner/docs62/modify_sql_query_on_the_fly.htm

S
sgchan author 10/2/2014

Thank you so much!!