Answer the question
In order to leave comments, you need to log in
Recording custom fields in the database?
Good time of the day, forum users, could you tell me, there are n-th number of fields, each has a plus sign, respectively, the field with a new name is cloned, how to write the whole thing into the database, store it there and conveniently read it. Thank you!
Answer the question
In order to leave comments, you need to log in
the simplest option is to store json, it is suitable if you will not have a selection from the database for these fields, because no index will give a normal search on such lines, this is an overhead and not canonical storage. Ideally, a separate table with the values of each set as strings, a key relationship with the parent (as noted in the comments, a one-to-many relationship).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question