在mybatis的xml中使用like查询数据时,出现这个错误:
原因为参数设置,写成了#{} ,like "%#{word}%"
修改方法:把#{} 改为 ${} 即可
select max(word_id) from vocabulary where audio_path !='' AND is_delete =0 and phase_code like "%${phaseCode}%"
在mybatis的xml中使用like查询数据时,出现这个错误:
原因为参数设置,写成了#{} ,like "%#{word}%"
修改方法:把#{} 改为 ${} 即可
select max(word_id) from vocabulary where audio_path !='' AND is_delete =0 and phase_code like "%${phaseCode}%"