Added Other AP
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
class CityServiceModel {
|
||||
|
||||
public static function get($db, $city) {
|
||||
$city = (int)$city;
|
||||
|
||||
// Step 1: Load address
|
||||
$q = "SELECT *FROM city_services WHERE city_id = ${city}";
|
||||
$r = pg_query($db, $q);
|
||||
if ($r && pg_num_rows($r)) {
|
||||
$results = pg_fetch_all($r);
|
||||
} else {
|
||||
return [NULL, "Services not found"];
|
||||
}
|
||||
|
||||
return [$results, NULL];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user