thank
fix Error Code: 1068. Multiple primary key defined
Yes i have a same error pls help
Ok so i have fixed http://prntscr.com/eyvkev
so on users you have a identifier like: http://prntscr.com/eyvkwn
so you need to create a index like: http://prntscr.com/eyvl8e
and you need to down the 255 value on 70 like on my screen
so after do that go to user_inventory and do the same of me ^^ like:
http://prntscr.com/eyvlzz
http://prntscr.com/eyvm7l
and go test now in game.
Can you make an exemple for how to add a item please ? i mean the syntax
Nervermind i found it… But how we can test the item ? have you a script for add item to the player ?
I’m working on a script of recolting items but now you can’t really test it, that why
I wrote It’s a resource more for developers.
It’s fast to create it ?
Ayone have good sql script for me please it’s not working with fix for me
Thanks
Can you give me the link for see how to add a item pls
Can you send me your database script please ?
It’s not working for me
Show me your data base on users
DROP TABLE IF EXISTS items
;
CREATE TABLE items
(
id
int(11) unsigned NOT NULL AUTO_INCREMENT,
libelle
varchar(255) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE users
ADD PRIMARY KEY (identifier
);
DROP TABLE IF EXISTS user_inventory
;
CREATE TABLE user_inventory
(
user_id
varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT ‘’,
item_id
int(11) unsigned NOT NULL,
quantity
int(11) DEFAULT NULL,
PRIMARY KEY (user_id
,item_id
),
KEY item_id
(item_id
),
CONSTRAINT user_inventory_ibfk_1
FOREIGN KEY (user_id
) REFERENCES users
(identifier
),
CONSTRAINT user_inventory_ibfk_2
FOREIGN KEY (item_id
) REFERENCES items
(id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Hum i use heidi sql so its not the same workbench, np so do you create a index for identifier ? first
Can you give me the link dude for add item pls thks
I have HeidiSQL
Can you give me back your script for user_inventory please it was deleted