From 39b99169d117d1dff270fa3c75856ec004263979 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 28 Jun 2019 16:12:55 -0400 Subject: [PATCH] Bug Fix for city drop down list Need to grab cities for member info records that are in sub categories also. --- classes/data/dataCities.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/data/dataCities.php b/classes/data/dataCities.php index 4b8bccc0..eef7111f 100644 --- a/classes/data/dataCities.php +++ b/classes/data/dataCities.php @@ -251,8 +251,10 @@ class GlmDataCities extends GlmDataAbstract if ( isset( $actionData['request']['category'] ) && $actionData['request']['category'] ) { $where .= " AND MI.id IN ( SELECT member_info - FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "category_member_info - WHERE category IN (" . $actionData['request']['category'] .") + FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "category_member_info M, + " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "categories C + WHERE M.category IN (" . $actionData['request']['category'] .") + OR (C.parent IN (" . $actionData['request']['category'] .") AND M.category = C.id ) ) "; } if ( isset( $actionData['request']['county-search'] ) && $actionData['request']['county-search'] ) { @@ -267,6 +269,7 @@ class GlmDataCities extends GlmDataAbstract "; } + // echo '
'.print_r($where, true).'
'; // Get a list of all cities (optionally for active members only) $cities = $this->getList( $where, 'name' ); -- 2.17.1