Guest User

Untitled

a guest
Oct 17th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. change node__field_location to your address field table name , column name also
  2.  
  3. $query = \Drupal::database()->select('node__field_location', 'fa');
  4. $query->fields('fa', ['field_location_locality']);
  5. $query->condition('bundle', 'venture');
  6. // $query->condition('field_location_locality', '', 'like');
  7. // $query->condition('field_location_country_code', '');
  8. $query->distinct();
  9. $query->orderBy('field_location_locality');
  10. $courseRatings = $query->execute()->fetchAll(\PDO::FETCH_ASSOC);
Add Comment
Please, Sign In to add comment