java该怎么写sql语句 10
Stringname=this.textfieldname.getText();Stringpassword1=newString(this.passwordfield1...
String name = this.textfieldname.getText();
String password1 = new String(this.passwordfield1.getPassword());
String password2 = new String(this.passwordfield2.getPassword());
String sex = null;
if(this.readiobuttonboy.isSelected()) {
sex = this.readiobuttonboy.getText();
} else {
sex = this.readiobuttongirl.getText();
}
String sport = null;
if(this.checksport.isSelected()) {
sport = this.checksport.getText();
}
String read = null;
if(this.checkread.isSelected()) {
read = this.checkread.getText();
}
String nati = this.comboboxnative.getSelectedItem().toString();
String remark = this.textarearemark.getText();
String addsql = "INSERT INTO user(user_name,user_password,user_sex,user_hobby,user_native,user_remark)" +
"VALUES(?,?,?,?,?,?)";
String deletesql = "DELETE user WHERE user_name = 'name'";
String refersql = "SELECT * FROM user WHERE user_name = 'name'";
String updatesql = ""; 展开
String password1 = new String(this.passwordfield1.getPassword());
String password2 = new String(this.passwordfield2.getPassword());
String sex = null;
if(this.readiobuttonboy.isSelected()) {
sex = this.readiobuttonboy.getText();
} else {
sex = this.readiobuttongirl.getText();
}
String sport = null;
if(this.checksport.isSelected()) {
sport = this.checksport.getText();
}
String read = null;
if(this.checkread.isSelected()) {
read = this.checkread.getText();
}
String nati = this.comboboxnative.getSelectedItem().toString();
String remark = this.textarearemark.getText();
String addsql = "INSERT INTO user(user_name,user_password,user_sex,user_hobby,user_native,user_remark)" +
"VALUES(?,?,?,?,?,?)";
String deletesql = "DELETE user WHERE user_name = 'name'";
String refersql = "SELECT * FROM user WHERE user_name = 'name'";
String updatesql = ""; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询