title: Can I detect and handle MySQL Warnings with PHP?
body: <p>I'm dealing with a MySQL table that defines the JobName column as UNIQUE.  If somebody tries to save a new Job to the database using a JobName that is already in the database, MySQL throws a warning.</p>
  
  <p>I would like to be able to detect this warning, just like an error, in my PHP script and deal with it appropriately.  Ideally I would like to know what kind of warning MySQL has thrown so that I can branch the code to handle it.</p>
  
  <p>Is this possible?  If not, is it because MySQL doesn't have this ability, PHP doesn't have this ability, or both?</p>