当前位置:首页 » 编程语言 » ibatissqlnotin

ibatissqlnotin

发布时间: 2025-01-22 14:42:25

Ⅰ Ibatis里面用in写sql语句,问什么报下面的错

ibatis sql in 操作(iterate属性)

1、使用iterate属性,status为数组。

<isNotNull property="status">
<![CDATA[ status in ]]>
<iterate property="status" conjunction="," open="(" close=")">
#status[]#
</iterate>
</isNotNull>

2、使用$,但这种写法存在一定的风险,可能会引起sql注入。

SELECT * FROM test WHERE status in ($status$);

热点内容
qq和安卓哪个用的人多 发布:2025-07-03 04:31:37 浏览:653
日本溥仪访问 发布:2025-07-03 04:24:27 浏览:672
java文件遍历 发布:2025-07-03 04:22:22 浏览:140
android画虚线 发布:2025-07-03 04:11:04 浏览:384
系统启动密码怎么取消 发布:2025-07-03 04:08:06 浏览:746
python程序设计第三版课后答案 发布:2025-07-03 03:58:08 浏览:213
socket上传文件 发布:2025-07-03 03:57:24 浏览:895
安卓cleo脚本 发布:2025-07-03 03:41:26 浏览:245
编程器解读 发布:2025-07-03 03:22:49 浏览:24
中国电信加密通信业务 发布:2025-07-03 03:06:00 浏览:521