求INSTR句-----在线
select * from xxxx where INSTR( ', '+SpecialID+ ', ', ',159, ')> 0 and IsChecked=0 order by hits desc
SpecialID 字段 记录159
我再想求.SpecialID记录158要怎么求.
就是同时求 出 159 和158的记录
在线急......................
------解决方案--------------------select * from xxxx where SpecialID in(159,158) and IsChecked=0 order by hits desc
------解决方案--------------------select * from xxxx where (INSTR( ', '+SpecialID+ ', ', ',159, ')> 0 or INSTR( ', '+SpecialID+ ', ', ',158, ')> 0) and IsChecked=0 order by hits desc