|
|
@@ -136,14 +136,14 @@ jQuery(document).ready(function () {
|
|
|
where 1=1
|
|
|
;
|
|
|
|
|
|
- update `_zasob_path_idx` as p set p.`idx_PATH`=concat('0-', p.`P_ID`), p.`idx_PATH_DESC`=concat('', p.`DESC`) where p.`P_ID`=0;
|
|
|
- update `_zasob_path_idx` as p set p.`idx_PATH`=concat('-1-', p.`P_ID`), p.`idx_PATH_DESC`=concat('-1/', p.`DESC`) where p.`P_ID`<0;
|
|
|
+ update `_zasob_path_idx` as p set p.`idx_PATH`=concat('0-', p.`ID`), p.`idx_PATH_DESC`=concat('', p.`DESC`) where p.`P_ID`=0;
|
|
|
+ update `_zasob_path_idx` as p set p.`idx_PATH`=concat('-1-', p.`ID`), p.`idx_PATH_DESC`=concat('-1/', p.`DESC`) where p.`P_ID`<0;
|
|
|
SET @i = 0;
|
|
|
SET @loopLomit = 100;
|
|
|
SET @pinitCnt = 1;
|
|
|
WHILE @i < @loopLomit and @pinitCnt > 0 DO
|
|
|
update `_zasob_path_idx` p join `_zasob_path_idx` pp on(pp.`ID`=p.`P_ID`)
|
|
|
- set p.`idx_PATH`=concat(pp.`idx_PATH`, '-', p.`P_ID`)
|
|
|
+ set p.`idx_PATH`=concat(pp.`idx_PATH`, '-', p.`ID`)
|
|
|
, p.`idx_PATH_DESC`=concat(pp.`idx_PATH_DESC`, '/', p.`DESC`)
|
|
|
where p.`idx_PATH`='' and pp.`idx_PATH`!='';
|
|
|
SET @pinitCnt = ROW_COUNT();
|