Hello,
I have a mysql table that just has a user_id and a property_id.... a user can enter properties into this table and they can later be displayed.... however, I don't want people to enter the same property 100 times to that table.... so the user_id and property_id should always be a unique combination. How can i set this up?
Thanks,
-dr
Create a unique index for those columns
create UNIQUE index indy_props ON yourtable (user_id, property_id);
Or just validate whatever they're trying to enter.