📄 我的体会.txt
字号:
if(commodityID!=null){
DBConnectBean dbBean=new DBConnectBean("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:shopping","","");
for (int i=0;i<commodityID.length;i++){
Hashtable tmptable=new Hashtable();
System.out.print(" zheggeeeg "+commodityID[i]);
tmptable=dbBean.getOneRecord("select card,num,price,picture from commodity where id="+commodityID[i]);
commodity=new Hashtable();
//少加了这句 就很可怕了,每次的东西都一样哦 注意 去查查
commodity.put("id".toUpperCase(),commodityID[i]);
commodity.put("card".toUpperCase(),tmptable.get("card".toUpperCase()));
commodity.put("num".toUpperCase(),tmptable.get("num".toUpperCase()));
commodity.put("price".toUpperCase(),tmptable.get("price".toUpperCase()));
commodity.put("picture".toUpperCase(),tmptable.get("picture".toUpperCase()));
//out.print(commodityID[i]+" " +commodityNum);
commodityList.add(commodity);
}
session.setAttribute("commodityList".toUpperCase(),commodityList);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -