This topic is locked

Assign Value to Basic Search

9/16/2013 6:39:37 AM
PHPRunner General questions
J
jackolantern author

Did anyone can help or know how to assign value to basic search at first load?

I has try this method but no work.



//@list page:Before SQL Query

global $strTableName;

$_SESSION[$strTableName."_search"]=1;

$_SESSION[$strTableName."_searchfield"]="Period";

$_SESSION[$strTableName."searchoption"]="Equals";

$_SESSION[$strTableName."_searchfor"]="201309";
C
cgphp 9/16/2013

This is not the right way to filter records on the list page. Check out this code:

//List page: Before SQL query

$strWhereClause = whereAdd($strWhereClause,"MONTH(Period) = 09 AND YEAR(Period) = 2013");
J
jackolantern author 9/16/2013



This is not the right way to filter records on the list page. Check out this code:

//List page: Before SQL query

$strWhereClause = whereAdd($strWhereClause,"MONTH(Period) = 09 AND YEAR(Period) = 2013");



tq Christian, but that are not solution i want. coz it will limit my search to only that period.