Answer the question
In order to leave comments, you need to log in
How to store user items in the database?
Hello! There is a site where users buy, exchange and sell virtual goods. That is, for example, user 1 in the "arsenal" can have a microwave, a cactus, a car. How to store this same arsenal of each user in the database? I am using MySQL
Answer the question
In order to leave comments, you need to log in
the usual one-to-many relationship is a JOIN query to the product table from the user table with a foreign key relationship.
Tables:
user_items: user_id | item_id | qty
items: id | well, etc.
or
In the user's table, create a json column and store item_id and qty there
Will there be a central warehouse? If yes, then use bookkeeping (debit and credit) as with payments and wallet. Store all data in related tables and that's it.
Signed to the Apple Developer Program for the second year. As far as I know, payment by card is only possible for a small number of countries: US, UK, etc. I live in Russia and had to hand-write the form and fax/e-mail them to them.
email: [email protected]
fax: +1 (408) 862-7602
The form is available here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question