Situation:
Have a SET field called country with values
('us','uk','fr','intl')
When I go to pull the content from the db:
$sql = "SELECT id, title, content ";
$sql .= "FROM table_name ";
$sql .= "WHERE country='us'";
Works fine with entries labeled only ‘us’ but if the entry is ‘us,uk’ or ‘us,fr,intl’ and so forth. It does not pull those. Ideas?
Thanks!
You’d need to use the
FIND_IN_SET()function.