Commit f261ce03 authored by Ziwen Su's avatar Ziwen Su

Matched the backend of Jobtag.

parent 50a30cbd
...@@ -76,10 +76,15 @@ ...@@ -76,10 +76,15 @@
$sql .= "AND ".$filterArray[$key][0]." "; $sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][6][1]] = $items[1]; $attributes[$filterArray[$key][6][1]] = $items[1];
} elseif ( $items[0] == "or" ) { } elseif ( $items[0] == "or" ) {
for ( $i=1; $i<$n; $i++ ){ $sql .= "AND (".$filterArray[$key][1]." ";
$sql .= "AND ".$filterArray[$key][$i]." "; if ( $n>2 ){
$attributes[$filterArray[$key][6][$i]] = $items[$i]; for ( $i=2; $i<$n; $i++ ){
$sql .= "OR ".$filterArray[$key][$i]." ";
$attributes[$filterArray[$key][6][$i]] = $items[$i];
}
} }
$sql .=") ";
$attributes[$filterArray[$key][6][1]] = $items[1];
} }
} elseif ( strpos($key, '_INT') !== false ) { } elseif ( strpos($key, '_INT') !== false ) {
$items = explode(" ", $value); $items = explode(" ", $value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment