id | parent_id | path_string| path_identification_string | depth
---+-----------+------------+--------------------------------+------
87 | 2 | /87/ | countries | 2
88 | 87 | /87/88/ | countries/belgium | 3
89 | 87 | /87/89/ | countries/netherlands | 3
91 | 89 | /87/89/91/ | countries/netherlands/business | 4
92 | 89 | /87/89/92/ | countries/netherlands/economy | 4
90 | 87 | /87/90/ | countries/germany | 3
- Figure out new ID
- Insert new item:
Query:
INSERT INTO ezcontentobject_tree(id) VALUES (NULL);
SELECT LAST_INSERT_ID();
UPDATE ezcontentobject_tree SET
parent_node_id = 89, path_string = '/87/89/93/',
path_identification_string = 'countries/netherlands/food',
depth = 4
WHERE id = 93;