Paul Hughes
|
| Posted: 02/21/2002, 2:21 AM |
|
Hi all,
I've just created a very simple search->grid arrangement in CC, to dynamically create PHP.
The problem I have is that when I call the Default.php page, the database is queried before I have chance to enter my search parameters and every single record is fetched back. After that, I can enter search criteria and it works fine.
Selecting "required" for one of the fields prevents the initial search, but it means that I'd have to enter some search data in that particular field for a genuine serch to work.
The search form contains a subset of the fields which are in the grid form.
Any help much appreciated!
Regads,
Paul
|
|
|
 |
Alex Alexapolsky
|
| Posted: 02/21/2002, 4:22 AM |
|
You may place the code that will check if all parameters empty and
assign some dummy sql stement to sSQL variable into Open event ,
like
if IsEmpty(GetParam("name")) and IsEmpty(GetParam("test")) then
sSQL = "select * from table where 1<>1"
end if
|
|
|
 |
Paul Hughes
|
| Posted: 02/21/2002, 5:31 AM |
|
Cheers Alex, that help me get it working!
Regards,
Paul
|
|
|
 |
|