如何在phpMyAdmin

时间:2018-03-29 13:34:03

标签: mysql json phpmyadmin

我使用phpMyAdmin为我的项目数据库创建表。目前我的表格按此顺序排列table->{contents},但我希望它们像table->section_name1{contents},section2_name{contents}一样。我想要的JSON格式示例是link

1 个答案:

答案 0 :(得分:0)

你所要求的并不是很清楚。如果您只希望表中的内容可以通过section_name进行分组,就像在JSON示例中一样,那么您只需要将section_name设置为表中的一列,并为每个部分正确填充它。

如果不是那样,那么请你详细解释一下你想要做什么?

编辑:像这样:

------------------------------------------------------------------------
| Title     | Name        | Image                                       |
------------------------------------------------------------------------
| Section 1 | Donut       | https://thecustomizewindows.com/wp-....     |            
------------------------------------------------------------------------
| Section 1 | Eclairs     | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 1 | Froyo       | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 2 | Donut       | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 2 | Eclairs     | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 2 | Froyo       | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 3 | Donut       | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------
| Section 3 | Eclairs     | https://thecustomizewindows.com/wp-....     | 
------------------------------------------------------------------------