This topic is locked

Initial Search Conditions For First List Page

2/24/2008 2:10:13 PM
PHPRunner General questions
M
MikeB941 author

PHPRunner 4.1 Build 320
I've searched around quite a bit looking for the best answer to this one.
What is the best way to set initial or starting search conditions or criteria for the first time the user enters a list page (allowing them then to modify the search after that).
My specific example is I have a table of calendar events. I want the initial list page to show yesterday's and today's events, however the user may then wish to search on older events or events farther in the future.
Thanks so much for your help with this.
Take Care... Mike.

J
Jane 2/26/2008

Mike,
use List page: Before SQL query event on the Events tab for this purpose.

Here is a sample:

if ($_REQUEST["a"]!="search" && $_REQUEST["a"]!="advsearch" && $_REQUEST["a"]!="showall")

{

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

}