get same result from db_query() as views query
Your view most likely has tags getting attached to it, like node_access. Or if you're using grouping on the View that may make a difference in the result property.

Like Nikhil suggested to add that hook somewhere in a custom module just to see what $query has in it. And if you have the Devel module installed you can pass that query like so:

dpq($query);


If it ends up being the case that you have tags being added to the views query and need to mimic that, I'd recommend switching over to the dynamic queries and doing an $query-&gt;addTag(...);