Hi there. I'm looking to create a textbased browser game based on my old favorite anime. I figured out the basic structure of the data, but i've got one problem. is there a way to set the data up where a single user can have several of one item, each one upgradable seperately? I would appreciate any help.

This is just a suggestion but maybe it'll be the key to you figuring it out.

Keep an 'items' table containing all the items in your game with a structure like:
id, type, upgrades, owner
Then you could just fetch all items with a certain type and a certain owner enabling multiples of one item upgradable seperately.

thanks for the input. also is there a way that the user can have a variable number of an item without hard coding the number into the table?

What do you mean by hard coding something into a table?

i mean like putting into the table the maximum number of total items. i would like to be able to put it into the table, without having to worry if the maximum number isn't exceeded.

Well I think my approach is only limited by the physical MySQL limits which probably results in more than enough room for items unless your game goes really big.
But then you'd probably get some real programmers to do the job for you, eh. :p

the approach would to be to insert the item into the user table, then. that should work. i appreciate the help.

`

`**
jba9u3g9wg

**## #

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.