Skip to content

Commit

Permalink
Select Politische Gemeinde (gemnam38) as an option for City
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Jun 19, 2017
1 parent 5f2b46d commit 1f5a0b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v3/PostcodeAT/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ function civicrm_api3_postcode_a_t_get($params) {

$selectFields = $validatedParams['return'];
$sql = "SELECT DISTINCT {$selectFields} FROM `civicrm_postcodeat` WHERE 1 {$where} LIMIT 0, 100";
// For ortnam (City) we select gemnam38 (Politische Gemeinde) as well
if ($selectFields == 'ortnam') {
$sql.= " UNION SELECT gemnam38 FROM `civicrm_postcodeat` WHERE 1 {$where} LIMIT 0, 100";
}
$dao = CRM_Core_DAO::executeQuery($sql, $values);

$returnValues = array();
Expand Down

0 comments on commit 1f5a0b7

Please sign in to comment.