Using below query to insert update records:
INSERT INTO table (col_a,col_b,col_c,col_d) VALUES (val_a,val_b,val_c,val_d) ON DUPLICATE KEY UPDATE col_d = VALUES(col_d)
mySQL reports:
1 row affected per insert, 2 rows affected per update, 0 rows affected per duplicate
Followed link : Getting number of rows inserted for ON DUPLICATE KEY UPDATE multiple insert?
but didn't get correct numbers for inserted and updates records.
Is there any way of returning the correct number of inserts, updates and rows skipped (duplicates)?