title: MySQL PDO - check if INSERT IGNORE INTO was inserted
body: <p>How I can check if query <code>INSERT IGNORE INTO</code> was correctly inserted to database ?</p>
  
  <p>Now I checked it in that way:</p>
  
  <pre><code>$sql = $this-&gt;pdo-&gt;prepare("INSERT INGORE INTO ...");
  if ( $sql-&gt;execute() )
  {
      $last_id = $this-&gt;pdo-&gt;lastInsertId();
  }
  </code></pre>
  
  <p>But execute() always return <code>TRUE</code> when $last_id sometimes return <code>0</code> so I think my script is not good.</p>
  
  <p>Thanks.</p>