views:

53

answers:

1

I'm attempting to present a Drupal View that shows nodes in which the user's e-mail address shows up in one of two CCK text fields. Unfortunately, this doesn't seem to be possible using the stock version of Drupal's Views module - there doesn't appear to be a way to combine filtering criteria (except ANDing them), nor does their appear to be a way to do the custom logic for the filter's setting...

Is there a simple way of directly injecting additional information into a specific View's WHERE clause? If not, can it be done in another way?

+2  A: 

You can use the views_or module. It's still in dev but looks promising.

The other option is using hook_views_query_alter with $query->add_where() you should be able to add an or clause. You can also use it to add your aditional WHERE clause that you asked for.

googletorp
Thanks for the pointers, I'm trying both out now.
ceejayoz
`hook_views_query_alter` worked great, thanks!
ceejayoz

related questions