--- a/getAgency.php +++ b/getAgency.php @@ -47,7 +47,7 @@ } function addDefaultFields($row) { - $defaultFields = Array("name"); + $defaultFields = Array("name","orgType","parentOrg"); foreach ($defaultFields as $defaultField) { if (!isset($row[$defaultField])) $row[$defaultField] = ""; @@ -119,12 +119,20 @@ } else { try { - $rows = $db->get_view("app", "showNamesABNs")->rows; + /*$rows = $db->get_view("app", "showNamesABNs")->rows; //print_r($rows); foreach ($rows as $row) { // print_r($row); echo '<li><a href="getAgency.php?id=' . $row->key . '">' . (isset($row->value->name) && $row->value->name != "" ? $row->value->name : "NO NAME " . $row->value->abn) + . '</a></li>'; + }*/ + $rows = $db->get_view("app", "byName")->rows; + //print_r($rows); + foreach ($rows as $row) { + // print_r($row); + echo '<li><a href="getAgency.php?id=' . $row->value . '">' . + $row->key . '</a></li>'; } } catch (SetteeRestClientException $e) {