Quote:
Originally Posted by Derision
char_id is the primary key for the guild_members table. There should be no way MySQL will allow duplicate entries:
Code:
mysql> describe guild_members;
+----------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-----------------------+------+-----+---------+-------+
| char_id | int(11) | NO | PRI | 0 | |
| guild_id | mediumint(8) unsigned | NO | | 0 | |
| rank | tinyint(3) unsigned | NO | | 0 | |
| tribute_enable | tinyint(3) unsigned | NO | | 0 | |
| total_tribute | int(10) unsigned | NO | | 0 | |
| last_tribute | int(10) unsigned | NO | | 0 | |
| banker | tinyint(3) unsigned | NO | | 0 | |
| public_note | text | NO | | NULL | |
| alt | tinyint(3) unsigned | NO | | 0 | |
+----------------+-----------------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
Code:
mysql> insert into guild_members(`char_id`) values(1234);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into guild_members(`char_id`) values(1234);
ERROR 1062 (23000): Duplicate entry '1234' for key 1
EDIT: Must be something to do with changes required for bots. I see this in bots.sql
Code:
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
EDIT: is their an easy query i could apply to set that primary key again?
i learn sql at school about 25 years ago lol with cpp at that times, as soon as i get my setup perfectly workings i wil start peeking arounds
thanks