mysql table structure with multiple variables

前端 未结 2 1346
无人共我
无人共我 2021-01-25 14:59

I am writing a script which will counts the number of ticket as per as different conditions and store the count in a summary table. I am unable to understand how to structure my

2条回答
  •  清歌不尽
    2021-01-25 15:26

    Wrong approach. Do not splay an array across columns. Instead have rows for the data. This lets you trivially "add" another month.

    For displaying, well that is an application problem, no a MySQL problem. Sure, you can write specialized queries to "pivot" the data from rows to columns, but it is messy.

提交回复
热议问题