searchlib can use sql_ilike too!

This commit is contained in:
martinlanghoff
2006-09-26 05:08:39 +00:00
parent a8f4522dfa
commit 7e034f29a0
+2 -4
View File
@@ -314,14 +314,12 @@ function search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $
$userfirstnamefield, $userlastnamefield, $timefield, $instancefield) {
global $CFG;
$LIKE = sql_ilike();
$NOTLIKE = 'NOT ' . $LIKE;
if ($CFG->dbtype == "postgres7") {
$LIKE = "ILIKE"; // case-insensitive
$NOTLIKE = "NOT ILIKE"; // case-insensitive
$REGEXP = "~*";
$NOTREGEXP = "!~*";
} else {
$LIKE = "LIKE";
$NOTLIKE = "NOT LIKE";
$REGEXP = "REGEXP";
$NOTREGEXP = "NOT REGEXP";
}