I have a database of entities that I'm having Views filter on. I have enabled a contextual filter (argument), and when I test it programmatically:
$arguments = Array("2005+2002");
$view_result = views_get_view_result($view_name, NULL, $arguments);
I get only the 2005 results, whether I use "2005+2002" or "2005,2002". When I swap the order "2002+2005" and "2002,2005", I only get 2002 results.
In the views interface, when I set the argument, I get 2005 AND 2002 results, whether I specify "2005+2002" or "2005,2002". I'd expect AND and OR to behave differently (and perhaps there is a reason it presents the same results in this case), so the main issue is that the programmatic interface is producing different results than the program.
I am using the RC1 release from this past week.
Comments
Comment #1
merlinofchaos commentedYou should read the documentation for views_get_view_result() more carefully. You don't wrap the arguments in an array, individual arguments are sent directly through the function.