hook_views_query_alter creating additional OR statements I am  attempting to add some "OR" statements to my Drupal view (to accomodate a grouping of taxonomy terms). 

I am able to replace a tid one for one without an issue using the following code: 

function customedm_views_query_alter(&amp;$view, &amp;$query) {
      if ($view-&gt;name == 'course_catalog') {
            dpm($query);
            foreach($query-&gt;where[1]['conditions'] as &amp;$condition){
                if ($condition['value'] == 422){
                    $condition['value'] = 311;
                }
            }
        }
}


The problem is, I need to replace this value with several values (311,316,and 326)

I've tried replacing the $conditions variable with the proper or statement e.g.:

$condition = "WHERE field_data_field_course_subject.field_course_subject_tid = '311' OR field_data_field_course_subject.field_course_subject_tid = '326'";


Or creating a second $query->where[] array with the seemingly appropriate entries into the array:

function customedm_views_query_alter(&amp;$view, &amp;$query) {
      if ($view-&gt;name == 'course_catalog') {
            dpm($query);
            foreach($query-&gt;where[1]['conditions'] as &amp;$condition){
                if ($condition['value'] == 422){            
                    $newconditions = array(
                    conditions =&gt; array(
                        array(
                            field =&gt; 'field_data_field_course_subject.field_course_subject_tid',
                            value =&gt; 311,
                            operator =&gt; '='
                            ),
                        array(
                            field =&gt; 'field_data_field_course_subject.field_course_subject_tid',
                            value =&gt; 326,
                            operator =&gt; '='
                            ),      
                        array(
                            field =&gt; 'field_data_field_course_subject.field_course_subject_tid',
                            value =&gt; 316,
                            operator =&gt; '='
                            )           
                        ),
                        args =&gt; array(),
                        type =&gt; "OR"
                    );
                    $query-&gt;where[] = $newconditions;
                }
            }
        }
}


Neither of these approaches seem to product the desired outcome (though I was able to verify that the array creating approach created the appropriate fields in $view->query... can someone show me how I can add OR statements to my query using this hook?
Thanks to iLLin I was able to figure out an acceptable answer to this question by using the in operator, and replacing the entire array for the condition.

function customedm_views_query_alter(&amp;$view, &amp;$query) {
  if ($view-&gt;name == 'course_catalog') {
        foreach($query-&gt;where[1]['conditions'] as &amp;$condition){
            if ($condition['value'] == 422){            
                $newvalue = array(
                    field =&gt; 'field_data_field_course_subject.field_course_subject_tid',
                    value =&gt; array(311, 316, 326, 321),
                    operator =&gt; 'in'
                );                      


                $condition = $newvalue;
            }
        }
    }
}