This topic is locked
[SOLVED]

 search with start value

10/31/2010 6:55:05 AM
PHPRunner General questions
U
unp author

How can I create an initial search value when I start on one side with the opportunity to elect a new search value in phprunner V5.2 and v5.3

A
ann 11/2/2010

Normann,
use Before SQL query event to filter List page (sample is for MySQL):

global $strTableName;

if (isset($_SESSION[$strTableName.'_advsearch']))

{

$searchClauseObj = unserialize($_SESSION[$strTableName.'_advsearch']);

if (!$searchClauseObj->isUsedSrch())

{

//search was not used, add custom filter here

//for example filter records where DateField=Now()

$strWhereClause = whereAdd($strWhereClause,"DateField=Now()");

}

}
J
Jane 11/2/2010

Hi,
could you give me more detailed description of where do you want to apply initial search value?

Do you want to fill fields on the advanced search page (or in the search panel)? Or do you want to apply search filter on the first page?