{pStat= conn.prepareStatement("select Difficulty from test where type="+a[i]);
这句不对,这个只能查到一个。如下:
String example = "select Difficulty from test where type =" + a[0];
for (int i = 1; i < 50;i++) {
example = example + " or type =" +a[i];
}
PreparedStatement pStat = conn.prepareStatement(example);
rs = pStat.executeQuery();
for(int i = 0; i < 50;i++) {
Difficulty[i] = rs.getFloat(i);
}
额~你到底要查出什么效果啊?是2个时间差,还是把2个时间当做区间连接起来?