看板 java 關於我們 聯絡資訊
: if(rs1.next()){ : while(rs1.next()){ : String SQL2 = "SELECT "+session.getAttribute("Role")+" FROM lvl : WHERE 功能 = '"+rs1.getString(2)+"'"; http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#next() Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on. 你多 move 了 還有您的痛苦來自於用了難用的方法 用 Prepared Statement 會輕鬆且安全一點 http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.167.103.78
PsMonkey:這未必是錯誤來源啊啊啊... 11/12 21:48
qrtt1:先改成容易成功的方法, 會讓自己的人蔘不會那麼苦澀 11/12 22:32