Revision 1305
Added by Jing Tao about 22 years ago
src/edu/ucsb/nceas/metacat/QuerySpecification.java | ||
---|---|---|
981 | 981 |
searchexpr = nodedataterm + " LIKE '%" + casevalue + "' "; |
982 | 982 |
} else if (searchmode.equals("contains")) { |
983 | 983 |
//searchvalue = "%" + casevalue + "%"; |
984 |
searchexpr = nodedataterm + " LIKE '%" + casevalue + "%' "; |
|
984 |
if (!casevalue.equals("%")) |
|
985 |
{ |
|
986 |
searchexpr = nodedataterm + " LIKE '%" + casevalue + "%' "; |
|
987 |
} |
|
988 |
else |
|
989 |
{ |
|
990 |
searchexpr = nodedataterm + " LIKE '" + casevalue + "' "; |
|
991 |
} |
|
985 | 992 |
} else if (searchmode.equals("equals")) { |
986 | 993 |
//searchvalue = casevalue; |
987 | 994 |
searchexpr = nodedataterm + " = '" + casevalue + "' "; |
Also available in: Unified diff
Made a shortcut for % search. It will look like: LIKE '%' rather than: LIKE '%%%'.