PHP/MySQL - Storing array data as JSON, bad practice?

前端 未结 4 924
遥遥无期
遥遥无期 2021-01-05 12:48

I was wondering whether or not storing an array as a JSON string in a mysql text field is good practice.

I am creating an invoice which allows the user to add an u

4条回答
  •  北海茫月
    2021-01-05 13:18

    If all you need is just to store - then it is not a bad practice.

    But if you need to perform any sort of processing, sorting or something similar - you need to normalize it.

提交回复
热议问题