You should check your database for
CREATE TABLE `guild_rank` (
`guildid` int(6) unsigned NOT NULL default '0',
`rid` int(11) unsigned NOT NULL,
`rname` varchar(255) NOT NULL default '',
`rights` int(3) unsigned NOT NULL default '0',
`BankMoneyPerDay` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`guildid`,`rid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Guild System';
There is no way to have 2 ranks with same rank_ids (`rid`) for one guild.
Or you use some old patch, that breaks function of guild ranks.
If you delete that table, all guilds will be disbanned, so you have to update its structure!