81,122
社区成员




<select id="texselecttimulist" parameterClass="strsql" resultClass="strsql">
select * form bs_timu_tab
<dynamic prepend="where">
<isNotEmpty prepend="and" property="jiaoshi">
jiaoshihao=#jiaoshi#
</isNotEmpty>
<isNotEqual prepend="and" property="nian" compareValue="0">
nian=#nian#
</isNotEqual>
<isNotEqual prepend="and" property="bei4" compareValue="0">
bei4 like "%"+#bei4#+"%"
</isNotEqual>
<isNotEmpty prepend="and" property="timu">
timu like "%"+#timu#+"%"
</isNotEmpty>
</dynamic>
</select>
<sql id="sql_select">
select *
</sql>
<sql id="sql_where">
form bs_timu_tab
<dynamic prepend="where">
<isNotEmpty prepend="BOGUS" property="jiaoshihao">
jiaoshihao=#jiaoshihao#
</isNotEmpty>
</dynamic>
</sql>
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the texselecttimulist-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'form bs_timu_tab where jiaoshihao='091201077'' at line 1
还是报错 错误提示的sql语句 我发现 没有select *