I hope this works for you

    $query = db_select('node','n')
    ->Join('field_data_field_projectresources','p','p.entity_id = n.nid');
     $query->fields('n',array('yourfieldnames'))
     ->fields('p',array('yourfieldnames'))
     ->condition('n.nid','5') ;
     $result = $query->execute();
And I think [this link][1] help you very much


  [1]: http://drupal.stackexchange.com/questions/6921/select-fields-from-two-tables-using-db-select