title: Get failed query in prepared statements
body: <p>I've a preparedstatement insert query. I want to implement an email notification system if that insert query fails. How can I identify the failed queries? </p>
  
  <pre><code>$stmt = $conn-&gt;prepare( "INSERT INTO user_persons ( NAME, DATE, ADDRESS, PINCODE ) VALUES ( ?, ?, ?, ? )" );
  $stmt-&gt;bind_param( 'ssss', $name, $date, $address, $pincode );
  $stmt-&gt;execute();
  $stmt-&gt;close();
  </code></pre>