當前位置:首頁 » 編程語言 » 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$);

熱點內容
白百何訪問 發布:2025-09-18 14:20:14 瀏覽:449
人人貸源碼 發布:2025-09-18 14:11:02 瀏覽:988
pythonlist刪除list 發布:2025-09-18 14:03:29 瀏覽:240
我的世界伺服器手機版新手 發布:2025-09-18 13:51:33 瀏覽:830
php從入門到精通下載 發布:2025-09-18 13:36:44 瀏覽:158
抖音使用腳本 發布:2025-09-18 13:29:36 瀏覽:806
c語言是王道 發布:2025-09-18 13:17:07 瀏覽:279
c語言des 發布:2025-09-18 13:10:39 瀏覽:675
編譯地址超出范圍 發布:2025-09-18 13:01:34 瀏覽:752
怎麼下載php 發布:2025-09-18 12:41:53 瀏覽:237