sql語句?老是報(bào)錯(cuò)
老是報(bào)錯(cuò),說
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 '?' at line 1
老是報(bào)錯(cuò),說
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 '?' at line 1
2017-08-11
舉報(bào)
2017-08-11
// 拼寫sql語句
String sql = "" +?
? ? ? ? ?" selete * from imooc_goddess "
+ " set user_name=?,sex=?,age=?,birthday=?,email=?,mobile=?, "
+ " update_user=?,update_date=current_date(),isdel=? "
+ " where id=? ";
?在第一行要有,后面要給這些屬性賦值,第一個(gè)屬性賦值為任意類型的字符串,所以要用?表示
2017-08-11
你的connection有問題吧,你看自己倒錯(cuò)包沒有?兩個(gè)一樣的connection是不需要強(qiáng)轉(zhuǎn)的啊。