Because Counties and Cities can be added separately, and as far as
authorlaury <laury@gaslightmedia.com>
Thu, 17 Jan 2019 17:56:59 +0000 (12:56 -0500)
committerlaury <laury@gaslightmedia.com>
Thu, 17 Jan 2019 17:56:59 +0000 (12:56 -0500)
commit74359241fbf0e9973be2414ed196399164058f35
tree3a430f983f417fe1d7800fccb596c6e823b8bf3c
parentd0181b6decda034edb2e73e67fb01286f95218a1
Because Counties and Cities can be added separately, and as far as
 Ad priority the City is prioritised over County (but both are
 taken into account), in some cases the County has to be found by
 searching for a member with that City in the Members table, and
 finding out what County that member has. This means that if there
 is any member in the members table that has a city in the wrong
 county (and there is at least one), it will mess up the
 city/county relation. I have added an extra check that looks at
 the member's county before it searches through the database.

What this means is that now, as long as a member has a county set,
 its own county will be looked at as far as which ad to pull
 (even if the county is wrong!) and only if it doesn't find one,
 uses the city to find a member in the database that has that city
 and grabs that member's county (again, even if it's wrong!).

This also means that there is currently a member with a wrong
 county or city, somewhere in the database. Finding out which one
 it is would take deeper and more thorough investigation.
functions.php
glm-member-db/views/front/members/detail.html