日期:2014-05-19  浏览次数:20697 次

急求!求大神帮我看看关于ibatis的sqlmap怎么写!急求!
sql语句是这样的SELECT * FROM #table# WHERE ID <= (SELECT ID FROM #table# WHERE history_date=#history_date# AND history_time=#history_date# );

我在sqlmap里面
<select id="getAllList" parameterClass="java.util.Map" resultClass="wh">
SELECT * FROM #table# WHERE ID <![CDATA[<= ]]>(SELECT ID FROM #table# WHERE
 
<isNotEmpty prepend="AND" property="history_date">
history_date=#history_date#
</isNotEmpty>
<isNotEmpty prepend="AND" property="history_time">
history_time=#history_time#
</isNotEmpty>

<![CDATA[
)
  ]]>

</select>
在log4j看的封装语句是对的 但是一直抱一个错误

求大神帮我下!很急!谢谢了 小弟分不多


------解决方案--------------------
图片死了 看不到错误 直接贴代码吧
------解决方案--------------------
SELECT ID FROM #table# WHERE
  
<isNotEmpty prepend="AND" property="history_date">
history_date=#history_date#
</isNotEmpty>
where and 應該 生成這樣了!所以報錯了!
------解决方案--------------------
在where后面加个 1=1