解决方案 »

  1.   

    你用了group_concat结果是11,22不假,但是被识别成'11,22'(字符串),而不是11,22(数字集)
    所以你查询不出结果
      

  2.   

    select * form name where inst in('11','22')能得到inst 为11或22的记录这里面的11和22是两个元素,用in操作的时候11和22都可以匹配select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1))这个得到的结果'11','22'是一个整体,也就是元素是单个就是('11','22') ,括号为了看的清除此时用in就不是匹配11和22两个了
      

  3.   

    这样写
    select * form name where inst in(select   content from other where FIND_IN_SET(id,getChildList(1)))
      

  4.   

    where inst in(select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1)))->
    where FIND_IN_SET(inst,(select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1))))
      

  5.   

    很感谢各位的回复,考滤到效率各方面的问题,我修改了数据库,把那字符串改成int 型id,这样方便点,而且效率应该也会高点。