I'm building a site that has a section with a directory listing of people that can be viewed by category. When people register, I want them to be able to check ALL categories that apply, not simply choose one or a fixed amount.
In my database, I have a Categories table that has a CategoryID field as the primary key, and a CategoryName varchar field.
What's the best way to associate a user with a variable and unlimited number of categories? I want to be able to send a query to the database that returns all the users that are in a particular category, regardless of whether they are in other categories also.