The Little Guy Posted April 22, 2010 Share Posted April 22, 2010 I have this multi query: LOCK TABLE categories WRITE; SELECT @myRight := rgt FROM categories WHERE parent = '$parent'; UPDATE categories SET rgt = rgt + 2 WHERE rgt > @myRight; UPDATE categories SET lft = lft + 2 WHERE lft > @myRight; INSERT INTO categories(name, parent, lft, rgt) VALUES ('$value', $parent, @myRight + 1, @myRight + 2); UNLOCK TABLES; I am getting the following error when I do the insert: #1048 - Column 'lft' cannot be null What am I doing wrong? Link to comment https://forums.phpfreaks.com/topic/199346-column-cannot-be-null/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.