execSQL2: select f.*,t.Tname, nd.FilterForm, if((t.SubSystem='10007' or t.SubSystem is null), 'y', 'n') as Visible from IMLBase_PanziPet.FormDef f inner join IMLBase_PanziPet.Tabledef t on t.ID=f.TabledefID left join IMLBase_PanziPet.NezetDef nd on f.NezetDefID = nd.ID where f.FormCsop='frm169_1' and (f.SubSystem='10007' or f.SubSystem is null) order by f.FormSorrend;select * from IMLBase_PanziPet.NezetImport where NezetDefID=103; - mysql - imlbase - i2o0oB4rt - InnoWair_Pamax - 3306 -