opposite of WHERE IN
Posted: Sun Dec 30, 2007 12:04 am
Is there an opposite to where in function? Basically I have a text column with country codes such as 'GB, US, AU' and I want to select only the rows that have 'GB'
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
I must be misunderstanding you since the solution is far too obviousI want to select only the rows that have 'GB'
Code: Select all
WHERE country = 'GB'Code: Select all
SELECT id
FROM `geo_settings`
WHERE find_in_set( 'GB', `country_codes` ) != ''
Code: Select all
LIKE '%GB%'