I have a table with diffrent category entries. I am trying to write a search query where I need to match items from a post and only those that match category criteria. Here's what I've got so far.
It doesn't look quite right, does it?
"SELECT * FROM mytable WHERE category = 'cat1' AND category = 'cat2' AND name LIKE '%".$_POST['search']."%'"