What is the cause of errors in the java-mysql statement?

Source: Internet
Author: User
SQL statement: Stringtelobj. getString (& quot; tel & quot;); Stringemailobj. getString (& quot; email & quot ;);...... sqls. add (& quot; updatefromuserloginName & #39; & quot; + uloginName + & quot; & #39;, userName & #39; & quot; + userName + & quot; & #39; whereloginName & #39; & q mysqljava

SQL statement:
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 + "'");
Error message:
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 = '2017-12-10 ', address = '000000', m' at line 1
I want to change this information in two tables, but an error occurs. Beginner. I don't know why.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.