sanjay
|
Posted: 01/29/2002, 10:29 PM |
|
Hello
Now i am going well in codecharge. Thanks to Codecharge its support and Forum.
Now i have problem. I want to Put a Combination of AND , OR Operator in Search form. To display data in the grid.
For Example.
I have date based query with faculty
From : fld1
AND Operator
TO : fld2
AND Operator
Co-ordinator : fld3
OR Operator
faculty1 : fld4
OR Operator
faculty2 : fld5
can we do this in CC
sanjay
|
|
|
Nicole
|
Posted: 01/30/2002, 1:42 AM |
|
The workaround is use custom code to create WHERE clause. Do not add Input parameters for grid form and build WHERE in Open event. E.g.:
PHP
$sWhere = " WHERE 1=1";
if (get_param("name") != "")
$sWhere .= " AND field1 = " . ToSQL(get_param("name"), "Text");
if (get_param("client_id") != "")
$sWhere .= " OR field2 = " . ToSQL(get_param("client_id"), "Number");
etc.
|
|
|
sanjay
|
Posted: 01/30/2002, 8:56 PM |
|
Thanks
but is there any solution in ASP using MS-Access
Please help
sanjay
|
|
|
Nicole
|
Posted: 01/31/2002, 4:06 AM |
|
ASP
sWhere = " WHERE 1=1"
if GetParam("name") <> "" then
sWhere = sWhere & " AND field1 = " & ToSQL(GetParam("name"), "Text")
end if
if GetParam("client_id") <> "" then
sWhere = sWhere & " AND field2 = " & ToSQL(GetParam("client_id"), "Number")
end if
|
|
|
|