Yeah np ^^
CREATE TABLE user_inventory
(
user_id
VARCHAR(50) NOT NULL DEFAULT ‘’,
item_id
INT(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
quantity
INT(11) UNSIGNED ZEROFILL NULL DEFAULT NULL,
PRIMARY KEY (user_id
),
INDEX Index 2
(item_id
, user_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
)
)
COLLATE=‘utf8_general_ci’
ENGINE=InnoDB
;
For add item just select the items table > SQL and wrote that
INSERT INTO items (id, libelle)
VALUES (‘1’,‘Weed’)
I don’t know if it’s work but you can change the Weed and the 1 = id
Oh yeah i see these later but nothing show up in the menu ):
I’ve create index for identifier
Yeah, when i press K nothing appear the menu is completly desappear…
No me the menu show up but nothing inside you need to update your file he have update ^^ for the key menu
And you identifier its need to be like http://prnt.sc/eyvl8e
Which file and which line i need to update to show the menu ?
here
but go download the new update here:
and show me again your error
Yoo okay so We goin to do step by step okay ?
Can we discuss on discord ? x) https://discord.gg/XASB9
Okay so:
Step 1: Go Create a new table here : http://prntscr.com/eyxd13
Step 2: Name like: http://prntscr.com/eyxda8
Step 3: add a user_id on VARCHAR 50 like these: http://prntscr.com/eyxdu4
Step 4: add a item_id on INT 11 White AUTO_INCREMENT Like: http://prntscr.com/eyxe2o
Step 5: add a quantity on INT 11 Like: http://prntscr.com/eyxehb
Step 6: Create a index primary and add user_id inside the primary key like: http://prntscr.com/eyxew0
Step 7: Create a simple index on key and add user_id, item_id inside the key index like: http://prntscr.com/eyxffu
Step 8: go to http://prntscr.com/eyxfqm and create a new key
for the first name like: user_inventory_ibfk_1 / user_id / users / identifier
and for the second name like: user_inventory_ibfk_2 / item_id / items / id
And its all good ^^ its should be like: http://prntscr.com/eyxgv0
2 Likes
Scapin
April 21, 2017, 12:27am
104
Any help on Phpmyadmin would be welcome
I’m lost in the middle of all this table, index, primary, etc…