mysql - 如何在 phpMyAdmin 中获取分区表

标签 mysql json phpmyadmin

我正在使用 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/

相关文章:

mysql - 任何人都可以帮助我连接 mysql(与 'reading initial communication packet' 处的 MySQL 服务器失去连接,系统错误 : 110)?

php - 无法从具有相同名称的 2 个不同表中同时选择 2 个字段

mysql - 如何在 PostgreSQL 中关闭严格模式

Mysql date_sub 间隔12个月

javascript - 创建返回通用 JSON 的函数

php - 成功更改 apache 服务器的端口后,我的项目没有打开。我可以使用新端口号访问管理面板

java - 在 Java Webapp 中将 mysql 表复制到 hive

php - Laravel 验证器响应嵌套数组

javascript - 定义要在工具提示中使用的 JSON 数据属性(工具提示显示 "Undefined")

Windows Server 2012 中的 phpmyadmin session 错误