SQLSTATE[23000]: Integrity constraint violation error handling
问题 I know what the error means, and why it's occurring, meaning this is not a duplicate of the many topics covering State 23000. I'm using PDO to insert a duplicate record into a table that has a compound PK. I did this on purpose, in order to automatically cancel the insertion of any duplicated records in to this specific table. The error, SQLSTATE[23000]: Integrity constraint violation , is killing the script. Is there a way to set the warn level for this particular error, to literally tell it