Using #mi_id# tells iBatis to prepare statement
SELECT * FROM message where m_id IN( ? )  ...
and obviuosly it'll return records with m_id="1,2,3,4"  (i.e. not (1 or 2 or
3 or 4) but whole string "1,2,3,4").
Simplest way is to use $mi_id$. The $ signs tell iBatis to substitute
$mi_id$ with actual string (i.e. 1,2,3,4) and create statement after that
substitution.

I think usually you'll have values needed for IN clause stored in some kind
of list or array. For that case look for <iterate> tag in iBatis docs.

Reply via email to