Using quest::SetGuild() to change a character's guild ends up putting them in multiple guilds. From what I understand, this is because DBSetGuild() uses 'REPLACE INTO' in the query and the guild_members table doesn't have a PRIMARY KEY or UNIQUE index.
This is from the MySQL reference manual on REPLACE INTO:
Quote:
Note that unless the table has a PRIMARY KEY or UNIQUE index, using a REPLACE statement makes no sense. It becomes equivalent to INSERT, because there is no index to be used to determine whether a new row duplicates another.
|