How can i limit the drop down list of countries in exposed filter? I try to use the script https://drupal.org/node/1772498, but I don't get the right db_query for countries in the nodes. I change the script on these line:

$result = db_query("SELECT DISTINCT(l.country) FROM {location} l ORDER BY l.country ASC");


and get the error message:

Notice: Undefined offset: 1 in DatabaseStatementBase-&gt;fetchAllKeyed() (line 2180 of E:\xampp\htdocs\testsite\includes\database\database.inc).


It will be great, if somebody can help me!
fetchAllKeyed requires a 2-column resultset. You only have 1 column l.country in your resultset. I'm infering from your question here ...


Did you make a views exposed filter ?
Can you add a relationship to the view on the parent node to filter to the countries set on that node(s)?