Sorry if it is a duplicate, but I haven't found anything yet about an inventory system like mine.
So I'm creating a game and I'm stuck on the inventory system. Here what i want to do :
There is a column named "Inventory" which stock items with text. For example, Players 1's Inventory can be like "Meat, Potion, Sword" and so on...
When the user defeat a mob, he get a drop, and the drop will be added in "Inventory".
$query=$db->prepare('UPDATE users SET Inventory= ('.$infomonstre["fightm_monsterloot"] .') WHERE username=:username'); $query->bindValue(':username', $username, PDO::PARAM_INT); $query->execute(); $query->CloseCursor();
In the user's page, the items are displayed normally.
What I want to do is adding the item in the inventory, and as you guess this is not working. Mainly because what I wrote would overwrite the Inventory, but this is also just not working at all, the Inventory stay empty.
Thanks for the help !