Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

I hope this works for you:

 $query = db_select('node','n');
 $query->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();

Here is another answeranother answer that will help you very much.

Check out documentation for 'join' on drupal.org.

I hope this works for you:

 $query = db_select('node','n');
 $query->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();

Here is another answer that will help you very much.

Check out documentation for 'join' on drupal.org.

I hope this works for you:

 $query = db_select('node','n');
 $query->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();

Here is another answer that will help you very much.

Check out documentation for 'join' on drupal.org.

Fix code. Better link text.
Source Link
rocketeerbkw
  • 4.6k
  • 2
  • 21
  • 28

I hope this works for you:

 $query = db_select('node','n');
 $query->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 thinkHere is this linkanother answer that will help you very much

Please note that 'join' method does not return the $query object so it will be wrong to do something like this:.

$query->join()->fields()->...

Check out documentation for 'join' on drupal.org.

I hope this works for you

 $query = db_select('node','n');
 $query->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 help you very much

Please note that 'join' method does not return the $query object so it will be wrong to do something like this:

$query->join()->fields()->...

Check out documentation for 'join' on drupal.org.

I hope this works for you:

 $query = db_select('node','n');
 $query->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();

Here is another answer that will help you very much.

Check out documentation for 'join' on drupal.org.

Fixed the code as it would cause a FATAL error
Source Link

I hope this works for you

 $query = db_select('node','n');
 $query->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 help you very much

Please note that 'join' method does not return the $query object so it will be wrong to do something like this:

$query->join()->fields()->...

Check out documentation for 'join' on drupal.org.

I hope this works for you

 $query = db_select('node','n')
 ->join('field_data_field_projectresources','p','p.entity_id = n.nid')
 ->fields('n',array('yourfieldnames'))
 ->fields('p',array('yourfieldnames'))
 ->condition('n.nid','5') ;
 $result = $query->execute();

And I think this link help you very much

I hope this works for you

 $query = db_select('node','n');
 $query->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 help you very much

Please note that 'join' method does not return the $query object so it will be wrong to do something like this:

$query->join()->fields()->...

Check out documentation for 'join' on drupal.org.

deleted 5 characters in body
Source Link
Yuseferi
  • 22.2k
  • 22
  • 118
  • 218
Loading
Source Link
Yuseferi
  • 22.2k
  • 22
  • 118
  • 218
Loading