Answer the question
In order to leave comments, you need to log in
How to add a lot of data in mysql?
I need to add several values to the database for the user.
Requires adding the ID (6-digit) of multiple "rooms" for the same user. How to make it practical and convenient. Create many fields, or somehow cram into one?
Answer the question
In order to leave comments, you need to log in
Through a separate table that contains at least two fields: user id and room id (well, and possibly other fields as well, such as the date this user joined this room, the access level in the room, and the like, depending on what else you need need to know about the user's membership in a particular room).
Such a relationship is called many-to-many, and is implemented by a separate table
Read about database normalization on Habré: https://habr.com/ru/post/254773/
If you still have specific questions, come back.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question