protected function implodeClauses(array $clauses)
    {
        $str = '';
        $op = false;
        foreach ($clauses as $clause) {
            // an 'OR' token will change the operator used
            // when concatenating the next clause
            if ($clause == 'OR') {
                $op = ' OR ';
                continue;
            }

            if ($op && $str) {
                $str .= $op;
            }

            $str .= $clause;
            $op = ' AND ';
        }

        return $str;
    }
protected function implodeClauses(array $clauses)
    {
        $str = '';
        $op = false;
        foreach ($clauses as $clause) {
            // an 'OR' token will change the operator used
            // when concatenating the next clause
            if ($clause == 'OR') {
                $op = ' OR ';
                continue;
            }

            if ($op && $str) {
                $str .= $op;
            }

            $str .= $clause;
            $op = ' AND ';
        }

        return $str;
    }
protected function implodeClauses ( array $ clauses ) { $ str = '' ; $ op = false ; foreach ( $ clauses as $ clause ) { // an 'OR' token will change the operator used // when concatenating the next clause if ( $ clause == 'OR' ) { $ op = ' OR ' ; continue ; } if ( $ op && $ str ) { $ str .= $ op ; } $ str .= $ clause ; $ op = ' AND ' ; } return $ str ; }
Implodes a list of WHERE clauses.

@param array $clauses

@return string
Implodes a list of WHERE clauses .