I have a dababase table with the following setup
| ID | ParentID | Category |
I Create a recordset and then an array using getRows()
' Create recordset
Set rsMenu = Server.CreateObject("ADODB.Recordset")
rsMenu.ActiveConnection = cnn
rsMenu.Source = "SELECT categoryID, ParentID, Category FROM categories ODERBY Category
rsMenu.CursorType = 0
rsMenu.CursorLocation = 2
rsMenu.LockType = 1
rsMenu.Open()
' Create array
Dim menu
menu = rsMenu.GetRows()
Is there a simple way to create an nested unordered list (with any depth) from that menu array?
| ID | ParentID | Category |
I Create a recordset and then an array using getRows()
' Create recordset
Set rsMenu = Server.CreateObject("ADODB.Recordset")
rsMenu.ActiveConnection = cnn
rsMenu.Source = "SELECT categoryID, ParentID, Category FROM categories ODERBY Category
rsMenu.CursorType = 0
rsMenu.CursorLocation = 2
rsMenu.LockType = 1
rsMenu.Open()
' Create array
Dim menu
menu = rsMenu.GetRows()
Is there a simple way to create an nested unordered list (with any depth) from that menu array?