Javascript:我有大约十个对象。我需要将它们存储在数据库(MySQL)中。
Welcome to LibrarySystem
1-Add book
2-Borrow book
Choose operation number what you want: 1
Enter shelf number which you want to add book:
1
Enter book's name which you want to add: added to shelf 1 successfully
数据库包括:对象表和对象设置表。 现在结果是下一个:
SUBSTRING(email,(POSITION('@' IN email) + 1),252)
但我需要在数据库中存储hierarhy数据。它看起来像hierarhy菜单或json。 我不想在php上使用递归函数。 我找到this link,但无法理解。
我将是一个像(id,item,parent)这样的表,如何构建一个sql查询。