title: Drupal 7 views how to modify where clause?
body: <p>I have a situation whereby i have to add a 0-9 link in the contextual filter of the glossary view</p>
  
  <p>How do i change the where clause part?
  i need to change </p>
  
  <pre><code>SUBSTRING(node.title, 1, :node_title) = :node_title1
  </code></pre>
  
  <p>to</p>
  
  <pre><code>SUBSTRING(node.title, 1, 1) =REGEXP ('[0-9]')
  </code></pre>
  
  <p>if certain value == '0-9'
  i tried to implement hook_views_query_alter but it is not working</p>
  
  <pre><code>function  custom_views_query_alter(&amp;$view, &amp;$query){
  
    $current_view=&amp;$view;
  
    switch($current_view-&gt;name){
  
      case  'glossary':
  
    if($query-&gt;where[0]['conditions'][0]['value'][':node_title1']=='0-9'){
      $query-&gt;where[0]['conditions'][0]['field']= "SUBSTRING(node.title, 1, 1) =REGEXP ('[0-9]')";
      echo "YES";
  
      dpm($query-&gt;where);
          }  } }
  </code></pre>