Hi guys,
I'm trying to follow the guide here:
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
on setting up a Nested Set Model for hierarchical data.
I'm following the guide, on a sqlite database using PHP.
SELECT @myRight := rgt FROM nested_category
WHERE name = 'TELEVISIONS';
UPDATE nested_category SET rgt = rgt + 2 WHERE rgt > @myRight;
UPDATE nested_category SET lft = lft + 2 WHERE lft > @myRight;
INSERT INTO nested_category(name, lft, rgt) VALUES('GAME CONSOLES', @myRight + 1, @myRight + 2);
UNLOCK TABLES;
Can someone please explain why this will not work?
I've never seen := before. And never used variables without SET.
Maybe this is too advanced for sqlite?
Thanks for your help