I have a query like this:
$query="INSERT IGNORE INTO mytable (key, word1, word2) VALUES (1, 'abc', 'def')";
And I'd like to somehow "catch" if the query was ignored because the primary key already exists.
Is there any was to make an "if" statement so my program could notify the user that the query was ignored?