Please do not give links to articles, since they have already been read, and the essence of the question in those moments that I did not understand.
I created the table:
create table `category` not exists ( `id` int(11) not null auto_increment, `name` varchar(255) not null, `left_key` int(11) not null, `right_key` int(11) not null, `level` int(11) not null default 0, primary key (`id`) ) engine=myisam default charset=utf8 auto_increment=1; Next, make a small dump:
insert into `category` (`name`, `level`) values ('ΠΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 1', 0), ('ΠΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 2', 0), ('ΠΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 3', 0), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 1', 1), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 2', 1), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 3', 1), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 1', 2), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 2', 2), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 3', 2), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 4', 2), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 5', 2), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 1', 3), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 2', 3), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 3', 3), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 1', 4), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 2', 4), ('ΠΠΎΠ΄ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΡ 3', 4); How now to update the left and right keys? I would be grateful for clarification in accessible language for the average user.