Each Article can have unlimited categories.
Categories are saved in the database like this
example article_category: ‘1’,’3′,’8′
OR
example article_category: ‘2’,’3′
So when I search for a listing under, lets say category 3
$category_id = $_REQUEST['category_id']; //3
$SQL = "SELECT * FROM ARTICLES WHERE article_category = '$category_id'";
If it were just one the above would work fine.
I hate to say it but I’m completely lost.. Would I use IN ?
= (equals) check against the complete string. what you want to do could be done using LIKE and the % comodin (it’s like * for files in
diror the like)however, i reccommend that you normalize the database and have categories as a subtable