I'm trying to do a custom sql query in Views for Drupal 7 and I have the following code in my views php, but I'm not sure if I'm doing this correctly.
<?php $xx = db_query('SELECT * FROM acl_node INNER JOIN acl_user ON acl_node.acl_id=acl_user.acl_id INNER JOIN users ON acl_user.uid=users.uid WHERE nid=201');
print_r($xx);
?>
After running that I get a big array, but none of the data in it. I tested the sql query and it is indeed working via my sql builder tool.