title: Prevent auto increment on duplicated entry?
body: <p>I have Table called <code>url_info</code> and the structure of the table is:</p>
  
  <p>url_info:<br> </p>
  
  <pre><code>url_id ( auto_increment, primary key )
  url ( unique,varchar(500) )
  </code></pre>
  
  <p>When I insert into table like this:</p>
  
  <pre><code>INSERT INTO url_info(url) VALUES('Tom');
  INSERT INTO url_info(url) VALUES('Jerry');
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>1 Tom
  2 Jerry
  </code></pre>
  
  <p>When I insert like this </p>
  
  <pre><code>INSERT INTO url_info(url) VALUES('Tom');
  INSERT INTO url_info(url) VALUES('Tom');
  INSERT INTO url_info(url) VALUES('Jerry');
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>1 Tom
  3 Jerry
  </code></pre>
  
  <p>The auto-increment id is incremented when I try to insert to duplicate entry. I have also tried <code>Insert Ignore</code></p>
  
  <p>How to prevent it from incrementing when I try to insert a duplicate entry?</p>