Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • deniol pahsy
    Participant
    Post count: 1

    Store tags in a way that allows for nesting:

    WITH RECURSIVE tag_hierarchy AS (
    SELECT id, name, parent_id
    FROM tags
    WHERE parent_id IS NULL
    UNION ALL
    SELECT t.id, t.name, t.parent_id
    FROM tags t
    INNER JOIN tag_hierarchy th ON th.id = t.parent_id
    )
    SELECT * FROM tag_hierarchy;

    snow rider 3d is fantastic!

Viewing 1 post (of 1 total)