Answer the question
In order to leave comments, you need to log in
Which way to store arrays?
Hello!
There is an array containing only int values for each user. What is the best way to store this information?
Required:
- Extract arrays, find convergences / discrepancies
- Add / remove values
As an option, I consider the following:
- Store the array in the RDBMS
- Process on the client side (php), and overwrite the entire array in the database.
I am looking for the most rational and productive approach. Thank you!
Answer the question
In order to leave comments, you need to log in
If the query level does not need a search for one of the numbers, then you can store the data in the form "int,int,int" ( implode(',', $array) ). Otherwise, you need to store in a separate entity, implementing a many-to-many relationship
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question