从本质上讲,我有一个方法来处理从表中获取的数据,以创建一个新的对象“ZExpert”。ZExpert有参数int id、int domain和double ZExpert。我在我获取数据的表中添加了一列,名为“Z_Expert_Score”
我想把对象的双倍ZExpert分数放在Z_Expert_score列中,在“Customer_Expert_ID”=domain和“Customer_ID”=ID的行中。这是我的尝试
ZExpert[] allZExpert = scrCalc.getzExpertAll();
for(int i = 0; i < allZExpert.length; i++) {
ZExpert currentZExpert = allZExpert[i];
int id = currentZExpert.getId();
int domain = currentZExpert.getDomain();
double ZExpertScore = currentZExpert.getzExpert();
Statement statement = conn.createStatement();
statement.executeUpdate ("INSERT INTO CONSUMER_EXPERT_ID
where CONSUMER_EXPERT_ID="+domain+"AND CONSUMER_ID="+id+ "(Z_EXPERT_SCORE) VALUES("+ZExpertScore+")");
}
提前感谢!