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

熱點內容
python路徑是否存在 發布:2025-05-13 19:08:38 瀏覽:569
保時捷卡宴哪個配置比較好 發布:2025-05-13 19:00:08 瀏覽:725
c語言負數運算 發布:2025-05-13 18:45:21 瀏覽:428
太空殺電腦版連接不到伺服器 發布:2025-05-13 18:40:19 瀏覽:457
同樣的配置為什麼跑分不同 發布:2025-05-13 18:39:06 瀏覽:278
獲取linuxcpu序列號 發布:2025-05-13 18:36:35 瀏覽:738
appleid為什麼連接伺服器出現問題 發布:2025-05-13 18:17:37 瀏覽:971
書翁怎麼配置 發布:2025-05-13 18:17:36 瀏覽:911
雲資料庫mongodb 發布:2025-05-13 18:16:12 瀏覽:774
A7編程 發布:2025-05-13 18:15:26 瀏覽:742