title: How to Insert / Update a Row in MySQL / PHP At The Same Time
body: <p>I want to insert into a MySQL row if the row doesn't exist, or update it if it does exist.</p>
  
  <p>Something like this:</p>
  
  <pre><code>$sqlQuery = "INSERT INTO table (Value1, Value2) VALUES ('$var1', '$var2') WHERE UniqueKey='$id'";
  </code></pre>
  
  <p>Is something like that possible?</p>