Serialize vs Implode

前端 未结 4 1613
执念已碎
执念已碎 2021-01-15 11:33

What do you think is the better way to go about storing a few image id\'s inside a record in a MySQL database? It\'s just the image id\'s which will be used to fetch the ima

4条回答
  •  清歌不尽
    2021-01-15 12:24

    My friend, serialization is to obtain a string representation of an object's status. Even if it works i don't think is the best way to do what you want. I would prefer to store a json object with the ids. Because a json object is multiplatform, is a string and is easily readable by a human i think is a good approach.

提交回复
热议问题