I have a mysql table with the following columns:
group_id
game_id
user_id
message
last_update
I want to make it so that no two rows can exist where the value of group_id for row x is equal to the value of group_id for row y AND the value of user_id for row x is also equal to the value of user_id for row y.
So, for example, let's say I insert the following following values:
group_id = 783
game_id = 34
user_id = 29237
message = none
last_update = 11233452
The above data, even if a mysql query tries to insert it, should not create a new row if a row already exists with the same combination of group_id and user_id. Is there a way to do this? Basically, I'm trying to get two columns to work together kind of like an unique index.