I am getting data like this
category : "c1,c2"
I am doing category.split(','); to get data like this
category: [ 'c1', 'c2' ]
I want to pass into SQL query for IN ( ) operator like this but unable to figure out way.
SELECT * FROM employee emp WHERE ......... AND emp.category in ( 'c1','c2' ) ORDER BY..
right now if I pass category.toString() it goes like this
SELECT * FROM employee emp WHERE ......... AND emp.category in ( c1,c2 ) ORDER BY..
which gives Error : 'Unknown column 'c1' in 'where clause'',
c1orc2? The error suggests not, and hence the error. Also, what RDBMS are you really using. SQL Server and MySQL are completely different products.c1andc2not the literal strings with those values. "I am using MySQL" Then please correct your tags to retag mysql, as I removed the conflicting tags.