skyline — 2012-09-13T07:08:22-04:00 — #1
$qry="SELECT DISTINCT(city) FROM table WHERE country='$country'";
If there are no rows with a 'city' where country=$country, it still gives 1 row result of NULL!
Why does it return a blank row rather than no rows?
guido2004 — 2012-09-13T07:52:49-04:00 — #2
DISTINCT is not a function, don't put () around the column name.
If you get a row with value NULL returned, then apparently there is a row in the database where country=$country and city=NULL.