I am quite new at database programming and I am having trouble doing searches in my database. I have a table with a column named Required_Items, it is just a list of required items separated by ‘;’. I can’t get the server to return the rows when querying :
'SELECT * FROM The_Table WHERE Required_Items LIKE '%item1%' '
It seems that the database can’t find that item in the column. The problem is that I want to be able to return rows that contain ALL the items. I would try something like:
'SELECT *
FROM The_Table
WHERE Requiered_Items LIKE '%item1%' AND
Requiered_Items LIKE '%item2%' AND
Requiered_Items LIKE '%item3%' AND//etc...
How can I do that knowing that there will be a variable number of these “items” to test ?