the best advice i have for you is to change your table design slightly
Code:
CREATE TABLE Users
( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
, firstname VARCHAR(99)
, lastname VARCHAR(99)
);
CREATE TABLE Activities
( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
, activityName VARCHAR(99)
);
CREATE TABLE UserActivities
( usr_id INTEGER NOT NULL
, act_id INTEGER NOT NULL
, PRIMARY KEY ( usr_id , act_id )
);
once you see how this works, i'm sure you will agree that it is more flexible and the queries are a lot simpler
there is one row in UserActivities for each activity that every user has
a given user will be in UserActivities multiple times (once for each of his activities), and a given activity will be in UserActivities multiple times (once for each user that has that activity), but the combination of usr_id and act_id values will be unique
