You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mahuntington ce24c1483e
Update 'README.md'
3 years ago
templates details for adding children 3 years ago
.gitignore gitignore 3 years ago
README.md Update 'README.md' 3 years ago
server.py cleanup 3 years ago

README.md

WITH RECURSIVE child (id, title, description, parent_id) AS
(
  SELECT id, title, description, parent_id
    FROM items
    WHERE id = 38
  UNION
  SELECT parent.id, parent.title, parent.description, parent.parent_id
    FROM child JOIN items as parent
      ON child.parent_id = parent.id
)
SELECT * FROM child;

https://www.mysqltutorial.org/mysql-adjacency-list-tree/