summaryrefslogtreecommitdiffstats
path: root/includes/venue.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/venue.php')
-rw-r--r--includes/venue.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/venue.php b/includes/venue.php
index 8edb136..de144fd 100644
--- a/includes/venue.php
+++ b/includes/venue.php
@@ -48,5 +48,15 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
return array_map(function ($r) { return $r->wpgvenue_city; }, $results);
}
+
+ static function venues_in_city($city)
+ {
+ global $wpdb;
+ $q = $wpdb->prepare(
+ "select id, wpgvenue_name from wpg_venues where wpgvenue_city=?", $city);
+ $results = $wpdb->get_results($q);
+
+ return array_map(function ($r) { return [$r->id, $r->wpgvenue_name]; }, $results);
+ }
}
}