java1996 2017-08-22 08:50 采纳率: 0%
浏览 958

字符串拼接问题eclipse一直报错

select * from user3 where name='"+name+"' and password='"+pwd+"'
里name 和password填什么才能变成
select * from user3 where name='any_value' and password='’;DROP TABLE user3

写出了的;DROP TABLE user3‘’ Eclipse一直报错

  • 写回答

2条回答

  • Tsui丶 2017-08-22 08:57
    关注

    你的双引号没对上
    String sql ="select * from user3 where name='"+name+"' and password='"+pwd+"'" ;

    评论

报告相同问题?

悬赏问题

  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题