Ragazzi Sto cercando di completare questa query -> il mio campo tag è impostato su UNIQUE e voglio semplicemente che il database ignori qualsiasi tag duplicato.Il tasto duplicato ignora?
INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c')
ON DUPLICATE KEY IGNORE '*the offending tag and carry on*'
o anche questo sarebbe accettabile
INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c')
ON DUPLICATE KEY UPDATE '*the offending tag and carry on*'
Vedi anche : ["INSERT IGNORE" vs "INSERT ... ON DUPLICATE KEY UPDATE"] (http://stackoverflow.com/q/548541/1402846). – Pang