i have a column in my database with string value like "1,2,3,4,5,". I want to compare and find an integer value I defined before in that string. But I want this string to have the purpose of an array. There is no problem up to here. I am finding the integer in array like that:
$sql='SELECT * FROM '. TOPIC_TABLE .' WHERE multi_dept LIKE \'%'.$prjId.',%\' ORDER BY topic';
but, when there is a topic have id 11 in the string, there will be an error.
{1,2,11,}-> when i search ID=1 in the string, it will find also 1 and 11. Is there anyway to avoid and solve this problem with SQL query?