Home  >  Article  >  Database  >  java更新mysql表内容出错

java更新mysql表内容出错

WBOY
WBOYOriginal
2016-06-06 09:35:111256browse

mysqljava

sql语句:
public static void deleteUser(String loginName){
String sql = "update user set flag=3 where loginName= "+ loginName ;
DBUtil.getInstance().delete(sql);
}
错误信息:
java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value: 'admin' Query: update user set flag=3 where loginName= 123654 Parameters: []
不太懂是怎么错了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn