У меня есть таблица, в которой я получаю левый и правый дочерний элемент Parent с помощью запроса объединения, но существует проблема, что он нормально работает на локальном хосте, но запрос объединения получает только первый оператор выбора на живом сервере.
Я застрял в чем дело?
Full Texts TId SId LeftN RightN LStatus RStatus
Edit Delete 1 - AMSJUTATE 1
Edit Delete 2 AMSJUTATE AMSNUDUCU AMSFEZAVU 1 1
Edit Delete 3 AMSNUDUCU AMSGUWUDE AMSTUTUNE 1 1
Edit Delete 4 AMSFEZAVU AMSXAWUXU AMSHALURA 1 1
Edit Delete 5 AMSGUWUDE AMSZUCIVO AMSKEFOFA 1 1
Edit Delete 6 AMSTUTUNE AMSFASOJA AMSZAPUPE 1 1
Edit Delete 7 AMSXAWUXU AMSTEMUJI AMSPOROBE 1 1
Edit Delete 8 AMSHALURA AMSBIZEZO AMSFOHOFI 1 1
Edit Delete 9 AMSZUCIVO AMSXUDINE 1
Edit Delete 10 AMSKEFOFA AMSZEVUTA 1
Edit Delete 11 AMSFASOJA AMSREXEGI 1
Edit Delete 12 AMSZAPUPE AMSBIXIBO 1
Edit Delete 13 AMSTEMUJI AMSHEFOVI 1
Edit Delete 14 AMSPOROBE AMSLUPAKE 1
Edit Delete 15 AMSBIZEZO AMSCUSIPU 1
Edit Delete 16 AMSFOHOFI AMSCEMUSU 1
Edit Delete 17 AMSXUDINE AMSKATOTU 1
Edit Delete 18 AMSZEVUTA AMSLECEVU 1
Edit Delete 19 AMSREXEGI AMSKOVUSA 1
Edit Delete 20 AMSBIXIBO AMSLIWULO 1
Edit Delete 21 AMSHEFOVI AMSJOLOWE 1
Edit Delete 22 AMSLUPAKE AMSREROXE 1
Edit Delete 23 AMSCUSIPU AMSPOMUBE 1
Edit Delete 24 AMSCEMUSU AMSPULINU 1
Edit Delete 25 AMSPULINU AMSWOFIVO 1
Edit Delete 26 AMSWOFIVO AMSGUVESU AMSREBEJI 1 1
Edit Delete 27 AMSGUVESU
Edit Delete 28 AMSREBEJI AMSWESIFE 1
Edit Delete 29 AMSWESIFE AMSBUSULA AMSWEWERO 1 1
Edit Delete 30 AMSBUSULA
Edit Delete 31 AMSWEWERO AMSVAZUGI 1
Edit Delete 32 AMSVAZUGI AMSMILONE 1
Edit Delete 33 AMSMILONE AMSNITIRE 1
Edit Delete 34 AMSNITIRE AMSLOVISO 1
Edit Delete 35 AMSLOVISO AMSKEVEDA 1
Edit Delete 36 AMSKEVEDA AMSMOWAME 1
Edit Delete 37 AMSMOWAME AMSHAXIVE 1
Edit Delete 38 AMSHAXIVE AMSJOZEFE 1
Edit Delete 39 AMSJOZEFE AMSNOSEWA AMSTAKOBE 1 1
Edit Delete 40 AMSTAKOBE AMSCOWUVO 1
Edit Delete 41 AMSNOSEWA
Edit Delete 42 AMSCOWUVO AMSVITIBU 1
Edit Delete 43 AMSVITIBU AMSRIRUCA 1
Edit Delete 44 AMSKATOTU
Edit Delete 45 AMSLECEVU
Edit Delete 46 AMSKOVUSA
Edit Delete 47 AMSLIWULO
Edit Delete 48 AMSJOLOWE
Edit Delete 49 AMSREROXE
Edit Delete 50 AMSPOMUBE
Edit Delete 51 AMSRIRUCA AMSBAGUDA 1
Edit Delete 52 AMSBAGUDA AMSDOSUKE AMSMUDEFA 1 1
Edit Delete 53 AMSMUDEFA AMSPOBEWE 1
Edit Delete 54 AMSPOBEWE AMSLIWEMI AMSRUPOZO 1 1
Edit Delete 55 AMSLIWEMI AMSJEZAMA 1
Edit Delete 56 AMSJEZAMA
Edit Delete 57 AMSRUPOZO AMSDEMEME 1
Edit Delete 58 AMSDEMEME AMSCOVUKU AMSHUSATE 0 1
Edit Delete 59 AMSHUSATE
Edit Delete 60 AMSCOVUKU AMSDEFUSE 1
Edit Delete 61 AMSDEFUSE
Edit Delete 62 AMSDOSUKE AMSBIFERI AMSROVAJU 1 1
Edit Delete 63 AMSBIFERI AMSNATORU AMSDIXINE 1 1
Edit Delete 64 AMSNATORU AMSSIWAPA 1
Edit Delete 65 AMSDIXINE
Edit Delete 66 AMSSIWAPA AMSNIBEDO AMSFOTUTU 1 1
Edit Delete 67 AMSNIBEDO
Edit Delete 68 AMSFOTUTU AMSLENADI 1
Edit Delete 69 AMSLENADI
Edit Delete 70 AMSROVAJU AMSTEFIWO 1
Edit Delete 71 AMSTEFIWO AMSJOZAWE 1
Edit Delete 72 AMSJOZAWE AMSTEHOKU AMSWUMIBO 0 0
Edit Delete 73 AMSWUMIBO AMSFUZISI AMSDIXUME 0 0
Edit Delete 74 AMSTEHOKU
Edit Delete 75 AMSFUZISI AMSLOBUCO 0
Edit Delete 76 AMSDIXUME AMSMODITO AMSJELIVI 0 0
Edit Delete 77 AMSLOBUCO
Edit Delete 78 AMSJELIVI AMSWUJIJA AMSVIZAFU 0 0
Edit Delete 79 AMSWUJIJA
Edit Delete 80 AMSMODITO
Edit Delete 81 AMSVIZAFU AMSZIJETI AMSZEZEZI 0 0
Edit Delete 82 AMSZIJETI AMSWAWASI 0
Edit Delete 83 AMSZEZEZI
Edit Delete 84 AMSWAWASI AMSKIDUFU 0
Edit Delete 85 AMSKIDUFU AMSJOROKE 0
Edit Delete 86 AMSJOROKE
Я показываю, какой запрос я использовал
select leftn as SId
from tree
inner join (select @sid:=(select group_concat(leftn,',',rightn)
from tree
where find_in_set(sid, @nsid) >= 1)
, @nsid:=@sid as fset
from tree, (select @nsid:='AMSJUTATE',@sid='')v )gr
on find_in_set(leftn,fset)
where leftn <> ''
union
select rightn as SId
from tree
inner join (select @sid:=(select group_concat(leftn,',',rightn)
from tree
where find_in_set(sid, @nsid) >= 1)
, @nsid:=@sid as fset
from tree, (select @nsid:='AMSJUTATE',@sid='')v )gr
on find_in_set(rightn,fset)
where rightn <> ''
Когда я выбираю на локальном хосте MySQL версии 5.5.8, он работает, но не работает на сервере MySQL - 5.7.24 на сервере. возвращает только первый оператор выбора.