Select fields from two tables using db_select()
Easy, just call fields() twice.

$query = db_select('table', 't');
$query-&gt;join('node', 'n', 'n.nid = t.nid');
$result = $query
  -&gt;fields('t', array('tid', 'field1', 'field2'))
  -&gt;fields('n', array('nid', 'field1', 'field2'))
  -&gt;execute();

foreach ($result as $row) {
  // Do something with $row.
}


You can call most methods multiple times (multiple fields, multiple conditions, multiple sort orders, multiple joins, ...).

Note that, as shown in my example, the call to join() needs to be separate and can not be "chained" (that's the technical term for having multiple method calls in a row) because it does not return the query object but the name for the table alias.