I have html form with a search box on it and a selection of tickboxes, each tickbox has a different value, for example, there might be 3 tick boxes each with a unique value such as '3' or '5' or '12'. The tickboxes are called "tickeditems".
I then have a sql database, one of the columns is called "products" and it has number in it seperated using commas, for example, one row has
another row has
what I want to do is run a query on this sql database which would return any results from the sql database that match what has been ticked.
For example, if the user ticks boxes
1 and 3
then clicks the forms search button, it would return all rows which have 1 and 3 stored in the sql column "products".
I normally run the following query
SELECT * FROM myproducts WHERE products IN ($_GET['tickeditems'])
But whatever I try, it doesnt seem to work.
Can anyone give me some help?
Thanks in advance