PDA

View Full Version : Finding things users have in common



jsoeurt
12 Dec 2007, 05:20 PM
I've got a database with users and the things they are interested in. The database contains the following fields:

username, interested1, interested2, interested3

User1 for example is interested in "rock music", "dvd movies with a happy ending" and "going on vacation"

Now I want to show User1 the username of a user that has things in common with User1. But I don't want it to be the same result every single time. And when there are no users with things in common I want to show a random username.

Does anyone know how to do this?

alvo
12 Dec 2007, 07:00 PM
If their interests are things that they choose to type into the fields, then it's going to be extremely hard to match anything up, as computers look for patterns that match and "going on vacation" and "taking trips" are interest matches, but a computer will see them as two unrelated items. Hopefully you've taken that into consideration.

To make the match not come out the same each time means you will need to add fields in your database to keep track of the last matches so you can check them against the new match and see if it was used before.