Gaetano
|
Posted: 01/24/2002, 12:32 PM |
|
I need to do a Search & Grid in two pages
I've two criteria on the form that filter the table on the same field with an OR operator.
For example: the grid contains the fields Name1, Name2
The table has a field Name
I Need to filter the data in this way
select Name from table where Name like ('%Name1') OR Name like ('%Name2')
I've seen the post http://www.gotocode.com/disc_viewt.asp?mid=643 but it's not good for me because it apply to the case of AND or OR for two different fields of the table. I need to apply the OR on the same field of the table.
Any idea?
Thanks
Gaetano
|
|
|
Nicole
|
Posted: 01/25/2002, 2:51 AM |
|
Gaetano,
you may replace generated AND condition with OR in Open event of result Grid form. E.g.:
ASP
sWhere = replace(sWhere, "AND", "OR")
sWhere = replace(sWhere, "and", "OR")
PHP
$sWhere = str_replace("AND", "OR", $sWhere);
$sWhere = str_replace("and", "OR", $sWhere);
|
|
|
|