已采納回答 / 不笨的jamin
第一,根據前端,你要設計你的數據庫和表。第二,做jdbc 和數據庫的connect。第三寫 sql 語句,使用java執行的函數,得到結果集合,傳給前端顯示
2017-08-14
最贊回答 / FIJIiiii
出現了Exception in thread "main" java.lang.Error: Unresolved compilation problems: ?? ?url cannot be resolved to a variable?? ?user cannot be resolved to a variable?? ?password cannot be resolved to a variable
2017-08-14
最新回答 / 慕婉清0689395
你看的這個是通過名字進行查詢,你想通過ID進行查詢只需將sb.append("where user_name = ?")改成sb.append("where id=?")就行了。
2017-08-11
已采納回答 / 690017359
// 拼寫sql語句 String sql = "" +? ? ? ? ? ?" selete * from imooc_goddess " + " set user_name=?,sex=?,age=?,birthday=?,email=?,mobile=?, " + " update_user=?,update_date=current_date(),isdel=? " + " where id=? ";?在第一行要有,后面要給這些屬性賦值,第一個屬性賦值為任意類型的字符串,所以...
2017-08-11
已采納回答 / 我也很絕望_但只能繼續學啊
哎,它提示了“找不到imooc”這張表,"jdbc:mysql://localhost:3306/imooc"這句話中,最后的“imooc”是數據庫,不是表格,你把ResultSet resultSet = statement.executeQuery("select user_name ,age from imooc");中的imooc改成表名就行了,要學會自己看錯誤提示,我也是新手,一起學習吧
2017-08-10