lib/db/cortex.php
public function mergeFilter($filters, $glue='and') {
		$crit = array();
		$params = array();
		if ($filters) {
			foreach($filters as $filter) {
				$crit[] = array_shift($filter);
				$params = array_merge($params,$filter);
			}
			array_unshift($params,'( '.implode(' ) '.$glue.' ( ',$crit).' )');
		}
		return $params;
	}
public function mergeFilter($filters, $glue='and') {
		$crit = array();
		$params = array();
		if ($filters) {
			foreach($filters as $filter) {
				$crit[] = array_shift($filter);
				$params = array_merge($params,$filter);
			}
			array_unshift($params,'( '.implode(' ) '.$glue.' ( ',$crit).' )');
		}
		return $params;
	}
public function mergeFilter ( $ filters , $ glue = 'and' ) { $ crit = array ( ) ; $ params = array ( ) ; if ( $ filters ) { foreach ( $ filters as $ filter ) { $ crit [ ] = array_shift ( $ filter ) ; $ params = array_merge ( $ params , $ filter ) ; } array_unshift ( $ params , '( ' . implode ( ' ) ' . $ glue . ' ( ' , $ crit ) . ' )' ) ; } return $ params ; }
merge multiple filters
@param array $filters
@param string $glue
@return array
merge multiple filters