I know that when doing a \[code\]INSERT IGNORE\[/code\] duplicate entries are ignored and errors become warning but here is what I need.Scenario: We have a table with 2 columns \[code\](id, name)\[/code\] where BOTH are \[code\]UNIQUE\[/code\] and \[code\]id\[/code\] is \[code\]PRIMARY KEY\[/code\].When you do an \[code\]INSERT IGNORE\[/code\] on column \[code\]name\[/code\] it creates the next \[code\]AUTO_INCREMENT\[/code\] for \[code\]id\[/code\] (even though it later doesnt exist in your DB, its just skipped) and when you call \[code\]LAST_INSERT_ID\[/code\] it gives you the that next \[code\]id\[/code\]. However I need to find the \[code\]id\[/code\] that caused the query to be ignore. In other words the \[code\]id\[/code\] of the \[code\]name\[/code\] that was a duplicate.Any MySQL/PHP trick is welcomed. Thanks.