What is the best way to store/retrieve an array in a Mysql database? Is serializing the data the best way?
I am looking for neat, nice way to do this.
What is the best way to store/retrieve an array in a Mysql database? Is serializing the data the best way?
I am looking for neat, nice way to do this.
Serializing is actually a worst way ever.
It is like if you cut a door from your expensive car, and use it as a sleigh, only because being too lazy to get some gas. Mysql is an expensive car and it have to be used properly, and solution have to be not a quick and dirty one but out of reason and knowledge.
The solution depends on the nature of the data in this array and most likely will involve a separate table (as tables in mysql being pretty much arrays themselves)