- ou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
这是说sql语句有语法错误,建议在写sql语句的时候,先在navicat中写完,并运行无误后在粘到代码里。
- Column ‘accountcode’ in field list is ambiguous
然后我的代码是这么写的:
<select id="findBankAccount" parameterClass="account" resultMap="lessAccountResultMap">
<![CDATA[
select
bankid,
bankname,
bankadress,
accounttype,
currency,
accountcode,
state,
nccode,
abbreviation,(select count(*) from sys_account where state = '$state$' ) as total,
formid,
keepersign
from sys_account a, sys_accform accf
where state = '$state$' and **a.accountcode = accf.accountcode**
]]>
<![CDATA[limit #start#,#limit#]]>
</select>
错误的意思是我的accountcode不明确