欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-06-03 14:21:42
...
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
我要往两个表里更改这些信息,但是出错了。初学者,不知道怎么错了

相关标签: mysql java