This is what I\'m doing right now (name is UNIQUE):
name
UNIQUE
SELECT * FROM fruits WHERE name=\'apple\';
Che
check out
INSERT IGNORE INTO ...
and
INSERT ON DUPLICATE KEY UPDATE ...
Thes second method is preferred as the IGNORE statement simply causes mysql to issue warning instead of error