sql="select * from article where shenhe0=1 and shenghe=1 and open_to_people=1
 and CHARINDEX('黄强',can_see_people)<>0  and typeid='"+cstr(typeid)+"' order by dateandtime desc"

解决方案 »

  1.   

    sql="select * from article where shenhe0=1 and shenghe=1 and open_to_people=1
     and CHARINDEX('黄强',can_see_people)<>0  and typeid='"+cast(typeid as varchar(10))+"' order by dateandtime desc"
      

  2.   

    sql="select * from article where shenhe0=1 and shenghe=1 and open_to_people=1 and CHARINDEX('黄强',can_see_people)<>0  and typeid="+cstr(typeid)+" order by dateandtime desc"-- orsql="select * from article where shenhe0=1 and shenghe=1 and open_to_people=1 and can_see_people like '%黄强%' and typeid="+cstr(typeid)+" order by dateandtime desc"