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
我要往兩個表裡更改這些信息,但是出錯了。初學者,不知道怎麼錯了
update 語法:
update userinfo
set userinfo = "111"
,gender ="222"