I have two tables property_description and property_extras.
Table property_description looks like
id location price etc etc
1 New York 3000 v v
Table property_extras looks like
property_id extras
1 12,14,16,167
Well the question is how should mysql query it look to return result only if at least one of extras is matched ?
You should ideally have extras normalized like
If you can’t convert your database structure into something like this, then you have to do something (terrible) like:
Or, If you can insert commas to the start and to the end like
,12,14,...,as delphist points out, simply: