Inventory System (Using a lot of MySQL)
#2

It\'s a very simple task, providing you have a primary key to identify a player\'s ID in your player accounts table.


ItemID - this should be an auto-incrementing value - similar to your auto-incrementing player ID field, but to uniquely identify item values

ItemPlayerID - a foreign key of the player\'s primary key ID from your players database

ItemModel - the model ID of the item, i.e. 1 for cellphone, 2 for phone, etc...


Once you\'ve set up the database in this way, you can simply execute a query like this to collect the information:

Code:
SELECT * FROM `items` WHERE `ItemPlayerID` = \'%d\'
%d being the player ID primary key.
Reply


Messages In This Thread
Inventory System (Using a lot of MySQL) - by Luis- - 29.04.2014, 14:13
Re: Inventory System (Using a lot of MySQL) - by Calgon - 29.04.2014, 14:31
Re: Inventory System (Using a lot of MySQL) - by Luis- - 29.04.2014, 19:51
Re: Inventory System (Using a lot of MySQL) - by Tamer - 01.05.2014, 09:44
Re: Inventory System (Using a lot of MySQL) - by Misiur - 28.05.2014, 10:41
Re: Inventory System (Using a lot of MySQL) - by Vince - 28.05.2014, 11:16

Forum Jump:


Users browsing this thread: 3 Guest(s)