title: MySQL insert/update based on two columns
body: <p>I would like to update or insert data based on two columns. </p>
  
  <p>Every user can have entries. Every user's entry has to be unique to the user. Different users can share entry IDs.</p>
  
  <p>Every entry will contain a piece of text.</p>
  
  <pre><code>id, user_id, entry_number, data
  1, 1, 1, "hello"
  2, 1, 2, "world"
  3, 1, 3, "fizz"
  4, 2, 1, "buzz"
  5, 2, 3, "fizzbuzz"
  </code></pre>
  
  <p>I want to be able to insert/update (depending on if it exists) this data. How do I do it?
  Thanks in advance</p>