title: If (SELECT...) = 0 INSERT . in MySql
body: <p>I am used to doing this in sql server</p>
  
  <pre><code>IF (SELECT COUNT(*) FROM table WHERE column1=@value1) = 0
  INSERT INTO table(column1, column2, column3) VALUES(@value1, @value2, @value3)
  </code></pre>
  
  <p>But I can't really get it to work in MySql. Please help :)</p>
  
  <p>---------------- EDIT ------------------</p>
  
  <p>There shouldn't be a lot of fuss or magic involved in this, I would assume.</p>
  
  <pre><code>If an e-mail does not exist in a table then insert several values into that table.
  </code></pre>
  
  <p>That's it. Preferbly a one liner, to embed in programming code.</p>