I wasn't sure how to explain this in the title, but what I have is a table like this:
user_id           | subscription_id
6                   12
6                   10
12                  6
4                   12
Each user can subscribe to all other users, but is it possible to prevent a user from subscribing to another user twice through a INSERT query?
As my subscription_id is not unique, this happens:
user_id           | subscription_id
6                   12
6                   12
And I want to avoid that. As far as I know INSERT IGNORE, INSERT UPDATE and ON DUPLICATE only works with unique keys.
 
     
     
    