我正在使用 phpMyAdmin 为我的项目数据库创建表。目前我的表格按此顺序 table->{contents}
但我希望它们像这样 table->section_name1{contents},section2_name{contents}
。我想要的 JSON 格式的示例如下 link .
最佳答案
不太清楚你在问什么。如果您只希望表中的内容可以按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-.... |
------------------------------------------------------------------------
关于mysql - 如何在 phpMyAdmin 中获取分区表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49557496/