re-added define('ERROR_DUPLICATE_KEY', 23000);

heeeyo, didn't think that through before removing it...