Drupal: Adding an inner join to a dynamic query