Talha Aslam Talha Aslam - 4 months ago 5
MySQL Question

SQL query doesn't work's

I have used this query but it doesn't work's with my data, i have attached the snapshot of data in my database as well.

enter image description here

MYSQL Query is as follow's:

SELECT * FROM hotPropertyAlert WHERE FIND_IN_SET('E2', locations) AND ( 'parking' = 'H' )


Once the query is executed didn't return's the result.

enter image description here

Thank's in advance...

Answer

Parking, being a column name, should not be quoted:

SELECT * FROM hotPropertyAlert WHERE FIND_IN_SET('E2', locations) AND ( parking = 'H' )