This topic is locked

Display results only after search criteria submitted

4/11/2007 2:51:58 AM
PHPRunner General questions
L
larryl author

I do not want to see any of the records until after the search criteria has been submitted. How am I able to achieve this? Currently, it lists all records by default before a search is preformed.
Also, is there any way to randomize the results of a search so that each time they are displayed in a random order each time?
I really like your program, however, I am not prepared to purchase unless I am able to achieve this.

J
Jane 4/11/2007

Larry,
please see my answers below:

  1. to hide all records check off No records on the first page option on the Edit SQL query tab in the PHPRunner.
  2. to randomize the record just don't use Order by clause on the Edit SQL query tab.

L
larryl author 4/11/2007

I am not using the order by clause and it is being ordered by phone number automatically. I would like to have the result records completely randomized each time a search is preformed. Is that possible with your program?

G
gverras 7/18/2007

Larry,

please see my answers below:

  1. to hide all records check off No records on the first page option on the Edit SQL query tab in the PHPRunner.
  2. to randomize the record just don't use Order by clause on the Edit SQL query tab.


How would I do the same for Reports? There is no No records on the first page check box option for reports.
Thanks,

George

J
Jane 7/19/2007

George,
there is no No records on the first page option for the reports.

You can add 1=0 where clause using BeforeQueryReport event on the Events tab.

Here is a sample code:

$strSQL1 = substr($strSQL,0,strpos($strSQL,"ORDER BY"));

$strSQL2 = substr($strSQL,strpos($strSQL,"ORDER BY"));

if (!strpos($strSQL," where "))

$strSQL = $strSQL1." where 1=0 ".$strSQL2;