代碼:Connection conn =DBHelper.getConnection(); String sql = "update userinfo set balance=?"+"where id=?"; PreparedStatement ps = (PreparedStatement) conn.prepareStatement(sql); ps.setDouble(1, balance); ps.setInt(2, id); ps.executeUpdate(sql);
3 回答
已采納

zzZerOrz
TA貢獻(xiàn)101條經(jīng)驗(yàn) 獲得超28個(gè)贊
問(wèn)號(hào)和where連起來(lái)了,拼接后是?where,中間需要一個(gè)空格
點(diǎn)擊展開后面3條
添加回答
舉報(bào)
0/150
提交
取消