I have a range of numbers in a table like below,
CATEGORIES TABLE
ID CATEGORY
1 Accounting
2 Real Estate
3 Banking & Finance
4 Aviation
5 Biochemistry
6 Poultry
etc
MEMBERS TABLE
ID CATEGORIES
1 2, 5, 7, 13, 21
2 3, 4, 5, 6, 10, 15
3 3, 7, 9
4 1, 15, 32, 35
5 8, 9, 12,
To view members under a category, the category id is passed as a string ($category) to the Category Page
Now i need to select Members that can work under Banking & Finance (3) so i used this query
Code: Select all
$category = 3;
$get = mysql_query("SELECT id FROM members WHERE categories='%$category%'");
Pls How do I select members with 3 and not 13 or 33 or 23 or 30 etc
Thanks,