ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and '"+list.get(i)+"'='"+condition[i]+"'");numofattib = resultset2.getRow();从表上看若i=1时numofattib = 2,为什么运行结果是numofattib = 0?
调试欢乐多
多了个'吧
ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and "+list.get(i)+"'='"+condition[i]+"'");
这样
ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and '"+list.get(i)+"'='"+condition[i]+"'"); 这里and '"+
多了个'吧
ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and "+list.get(i)+"'='"+condition[i]+"'");
这样
ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and '"+list.get(i)+"'='"+condition[i]+"'"); 这里and '"+ 和 +"'='
多了个'吧
ResultSet resultset2 = statement.executeQuery("select id from cusinfo where class='"+classname+"' and "+list.get(i)+"='"+condition[i]+"'");
这样