src/WPametu/DB/QueryBuilder.php
private function build_where(array $where_array){
        $where_clause = [];
        $counter = 0;
        foreach( $where_array as list($glue, $where) ){
            if( $counter ){
                $where_clause[] = $glue;
            }
            if( is_array($where) ){
                $where_clause[] = $this->build_where($where_array);
            }else{
                $where_clause[] = sprintf('(%s)', $where);
            }
            $counter++;
        }
        return sprintf('(%s)', implode(' ', $where_clause));
    }
private function build_where(array $where_array){
        $where_clause = [];
        $counter = 0;
        foreach( $where_array as list($glue, $where) ){
            if( $counter ){
                $where_clause[] = $glue;
            }
            if( is_array($where) ){
                $where_clause[] = $this->build_where($where_array);
            }else{
                $where_clause[] = sprintf('(%s)', $where);
            }
            $counter++;
        }
        return sprintf('(%s)', implode(' ', $where_clause));
    }
private function build_where ( array $ where_array ) { $ where_clause = [ ] ; $ counter = 0 ; foreach ( $ where_array as list ( $ glue , $ where ) ) { if ( $ counter ) { $ where_clause [ ] = $ glue ; } if ( is_array ( $ where ) ) { $ where_clause [ ] = $ this -> build_where ( $ where_array ) ; } else { $ where_clause [ ] = sprintf ( '(%s)' , $ where ) ; } $ counter ++ ; } return sprintf ( '(%s)' , implode ( ' ' , $ where_clause ) ) ; }
Build where clause

@param array $where_array
@return string
Build where clause