baavgai, on 15 Mar, 2009 - 05:31 AM, said:
Let's say I have tables that look like this:
Feature
FeatureId
Name
Package
PackageId
Name
PackageFeature
PackageId
FeatureId
It then becomes as simple as asking the database:
select PackageId, count(FeatureId) FeatureCount
from PackageFeature
where FeatureId in (2,3,4,6)
group by PackageId
order by count(FeatureId) desc
There are a number of ways to do this. A more elegant solution is to have a temp table with the user's list and do a join. It depends on the number of features you're looking at.
Hope this helps.
Thanks for the reply I really appreciate it

, could you explain the above query a little more? What does FeatureCount relate to and what are the numbers 2,3,4,6 for? I understand each function in the query, but I don't fully understand it as a whole.
I have about 13 features in the table. Could I make a blank table with the same fields as the feature table and when the user submits the form could I insert the values (yes/no) into the new table and then do a count and join query? And if yes could you help me with that as I haven't done much with joins and the count function.
This post has been edited by rjbzzr400: 15 March 2009 - 07:32 AM