sql="select * from 用户表 where 用户编号 not in( select 用户编号 from 回收站 ) and '"+type+"' like '%"+key+"%'";
的到的结果
select * from 用户表 where 用户编号 not in( select 用户编号 from 回收站 ) and '姓名' like '%天才说话%'
因为 and '姓名' 的关系, 我什么也查不出来。
但是去'' 又语法错误。。
不知道该怎么解决。
...全文
1278打赏收藏
SQL语句的问题。。
sql="select * from 用户表 where 用户编号 not in( select 用户编号 from 回收站 ) and '"+type+"' like '%"+key+"%'"; 的到的结果 select * from 用户表 where 用户编号 not in( select 用户编号 from 回收站 ) and '姓名' like '%天才说话%' 因为 and '姓名' 的关系, 我什么也查不出来。 但是去'' 又语法错误。。 不知道该怎么解决。