sql "NOT" in query
Posted on 2008-11-04
i face an interesting task!
i have a list of countries:
$cntry_list='United Kingdom,Austria,Belarus,Belgium,Bulgaria,Croatia,Czech Republic,......";
i need to select from my DB customers which countries are not in the list ($cntry_list)
i know how to select customers which countries are in the list:
$q = " SELECT * FROM customers_db WHERE customer_id IN ($cntry_list)";
but how to select customers that are not in the list?