开发者社区> 问答> 正文

字符串拼接问题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一直报错

展开
收起
爱吃鱼的程序员 2020-08-21 14:04:24 375 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你的双引号没对上
    Stringsql="select*fromuser3wherename='"+name+"'andpassword='"+pwd+"'";

    @"select*fromuser3wherename='"+name+"'"+"andpassword='"+pwd+"'";

    2020-08-21 14:04:40
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像