我的体会.txt
来自「电子商务网站使用MVC模式B/S结构功能不是很全适合初学者看」· 文本 代码 · 共 18 行
TXT
18 行
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 + =
减小字号Ctrl + -
显示快捷键?