我试图使用mysql的以下json。但是如何在mysql中建立儿童房D1和D2 ?现在我很难建立id"d"和他的孩子"d1"one_answers"d2"的主/细节关系。请建议如何做到这一点与mysql。
[
{ "id": "a", "title": "Auditorium A" },
{ "id": "b", "title": "Auditorium B", "eventColor": "green" },
{ "id": "c", "title": "Auditorium C", "eventColor": "orange" },
{ "id": "d", "title": "Auditorium D", "children": [
{ "id": "d1", "title": "Room D1" },
{ "id": "d2", "title": "Room D2" }
] },
谢谢
使用父Id引用此链接http://fullcalendar.io/docs/resource_data/Resource_Object/
Use Parent Id refer to this link http://fullcalendar.io/docs/resource_data/Resource_Object/
resources: [
{
id: 'a',
title: 'Room A'
},
{
id: 'a1',
parentId: 'a',
title: 'Room A1'
},
{
id: 'a2',
parentId: 'a',
title: 'Room A2'
}
]