首頁 >資料庫 >mysql教程 >java-mysql语句这样有错误问题出在哪?

java-mysql语句这样有错误问题出在哪?

WBOY
WBOY原創
2016-06-06 09:35:101127瀏覽

mysqljava

sql语句:
String tel = obj.getString("tel");
String email = obj.getString("email");
......
sqls.add("update from user loginName='"+uloginName+"',userName='"+userName+"' where loginName='"+loginName+"'");

sqls.add("update from userinfo loginName='"+uloginName+"',gender='"+gender+"',birthday='"+birthday+"',address='"+address+"', mobile='"+mobile+"',tel='"+tel+"',email='"+email+"',quanpin='"+CHNUtil.getFullSpell(userName)+"',jianpin='"+CHNUtil.getFirstSpell(userName)+"' where loginName='"+loginName+"'");
错误信息:
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 'from userinfo loginName='s123',gender='0',birthday='2015-12-10',address='1111',m' at line 1
我要往两个表里更改这些信息,但是出错了。初学者,不知道怎么错了

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn