title: MySQL Conditional Insert
body: <p>I am having a difficult time forming a conditional INSERT</p>
  
  <p>I have x_table with columns (instance, user, item) where instance ID is unique. I want to insert a new row only if the user already does not have a given item. </p>
  
  <p>For example trying to insert instance=919191 user=123 item=456</p>
  
  <pre><code>Insert into x_table (instance, user, item) values (919191, 123, 456) 
      ONLY IF there are no rows where user=123 and item=456 
  </code></pre>
  
  <p>Any help or guidance in the right direction would be much appreciated. </p>