Get profile2 fields based on user
If you really do have Profile2 installed and enabled, then you shouldn't get getting undefined function errors.  Double check that it is enabled.

Otherwise, you are going about this in the wrong way.  You really don't need to do queries like this.  Leverage the API:

$account = user_load(10);
$profile = profile2_load_by_user($account);


If you have a single profile for the user, $profile will be a node object.  Otherwise, it will be an array of nodes.  Then you can do something like:

$resources = field_get_items('node', $profile, 'field_resources', $profile-&gt;language);


Also take a look at this article for a handy helper function or read more about the Field API.  If $resources are taxonomy terms, then take a look at taxonomy_term_load for loading the associated terms.