Storing arrays in MySQL?

前端 未结 6 706
无人共我
无人共我 2021-01-14 07:44

On the Facebook FQL pages it shows the FQL table structure, here is a screenshot below to show some of it (screenshot gone).

You will notice that some items are an

6条回答
  •  一向
    一向 (楼主)
    2021-01-14 08:41

    The correct way to store an array in a database is by storing it as a table, where each element of the array is a row in the table.

    Everything else is a hack, and will eventually make you regret your decision to try to avoid an extra table.

提交回复
热议问题