Is there an easy way to return something to your code if a duplicate insert is attempted?
I want to do something like this (Obviously doesn't work because (ON DUPLICATE KEY INDEX UPDATE)-
query = "INSERT INTO quotes(symbol, date, open, high, low, close, volume, adj)"
query += "VALUES ('" + symbol + "', '" + Date + "','" + Open + "','" + High + "','" + Low + "','" + Close + "','" + Volume + "','" + Adj +"') ON DUPLICATE KEY INDEX SELECT (2)"
Maybe there is something with INSERT IGNORE INTO?
Basically I need to populate a database with millions of entries but it usually gets cut off in the middle, and this would speed it up as I could determine how far it made it last time in the code
Thanks for any help you can provide