29.04.2014, 14:31
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:
%d being the player ID primary key.
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\'