替换为:
"INSERT into user_info (username,password,email_id,mobile number) VALUES('"+user+"','"+pass+"','"+email+"','"+mb+"')";
通过:
"INSERT into user_info (username,password,email_id,mobile_number) VALUES(?, ?, ?, ?)";
以后按相应的顺序插入值时
myStat.setString(1, user);
myStat.setString(2, pass);
myStat.setString(3, email);
myStat.setString(4, mb);