I have content type
picture which has a field with the machine name
score. I have implemented the hook_views_query_alter()
which looks like the following; the main part is that I add a line which adds an extra where condition:
function pic_anlysis_views_query_alter(&$view, &$query)
{
...
$query->where[1]['conditions'][2] = array('field'=>"node.score","value"=>array(30, 60),"operator"=>"BETWEEN");
}
But the above doesn't work; I think that node.score is the wrong key used to represent the field in the query. Anyone knows what I should use instead?
Thanks
Fields are not stored in node table.
Try