title: MySQL - insert if doesn't exist yet
body: <p>I want to execute this MySQL query:</p>
  
  <p><code>INSERT INTO `cron-stats` (`user`) VALUES (".(int)$d['by-user'].")</code></p>
  
  <p>Whenever such user doesn't exist yet, as in:</p>
  
  <pre><code>SELECT 1
  FROM `cron-stats`
  WHERE `user` = ".(int)$d['by-user']."
  </code></pre>
  
  <p>How can I execute this in one query?</p>