Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- change node__field_location to your address field table name , column name also
- $query = \Drupal::database()->select('node__field_location', 'fa');
- $query->fields('fa', ['field_location_locality']);
- $query->condition('bundle', 'venture');
- // $query->condition('field_location_locality', '', 'like');
- // $query->condition('field_location_country_code', '');
- $query->distinct();
- $query->orderBy('field_location_locality');
- $courseRatings = $query->execute()->fetchAll(\PDO::FETCH_ASSOC);
Add Comment
Please, Sign In to add comment