Search code examples
drupalviewalter

How to update Drupal Views 2 query with OR expression?


I'd like to add an OR expression to Drupal 6.x Views 2 query in the following way:

Existing query:

SELECT node.nid AS nid FROM node node WHERE (expr1) AND (expr2)

New query - this is what I want to achieve:

SELECT node.nid AS nid FROM node node WHERE (expr1) AND (expr2 OR new_expr)

The question is how to update my existing query (build with Views 2 UI) with views_query_alter or some other hook in order to get expr2 OR'ed with new_expr?


Solution

  • Views Or - dev version, but it's work.