Use REPLACE
- works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted.
http://dev.mysql.com/doc/refman/5.0/en/replace.html
-- For your example query
REPLACE INTO table_name(name, value, id) VALUES
('phill', 'person', 12345)
Edit: Since you can't use REPLACE another option is to: set constraint indexes for the table data (primary key, uniqueness) and use INSERT IGNORE
INSERT IGNORE INTO table_name
SET name = 'phill',
value = 'person',
id = 12345;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…