« Return to FAQ database

Getting "Duplicate entry" errors

Please open the file ext/php/class.newsletter.php ( go to Plugins > Editor > WP3Newsletter > then search for 'class.newsletter.php' and click on it )

Change this line of code (around line number 877)

$sql = "INSERT INTO `"._DB_PREFIX."member_group` SET member_id = '".mysql_real_escape_string($member_id)."', group_id = '".mysql_real_escape_string($group_id)."'";

to this line of code

$sql = "REPLACE INTO `"._DB_PREFIX."member_group` SET member_id = '".mysql_real_escape_string($member_id)."', group_id = '".mysql_real_escape_string($group_id)."'";

please send in a support ticket with wp login details if you need assistance with this change.