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.
|
|
3 years ago | |
|---|---|---|
| templates | 3 years ago | |
| .gitignore | 3 years ago | |
| README.md | 3 years ago | |
| server.py | 3 years ago | |
README.md
WITH RECURSIVE parent_path (id, title, description, path) AS
(
SELECT id, title, description, title as path
FROM items
WHERE parent_id IS NULL
UNION ALL
SELECT i.id, i.title, i.description, CONCAT(ip.path, ' > ', i.title)
FROM parent_path AS ip JOIN items AS i
ON ip.id = i.parent_id
)
SELECT * FROM parent_path WHERE id = 38;