参考:
1)使用循环语句保存,如:
for(int i=0;i<peoples.lenth;i++)
String values = String[i];
2)显示类似
1)使用循环语句保存,如:
for(int i=0;i<peoples.lenth;i++)
String values = String[i];
2)显示类似
解决方案 »
- Struts2 流下载有问题,大侠们请出手相助
- ExtJs ComboBoxTree 初始化值 问题
- 麻烦各位前辈帮我看这三题的答案为何?
- 为什么用jsp制作网站在tomcat中总是读写tomcat/webapps/ROOT/WEB-INF/中bean的问题
- 大家来看看,cannot resolve symbol
- can not locate JspServlet.java from project source /class path !!!在线急等!!!!谢谢
- 超级基础问题,但我不知错在哪里
- 80分,这种网站技术如何处理,就是一个页面需要显示恨多小图片,点击小图片便展示真实的大图片
- 求40位数的N!的代码,4个错误,谁给俺讲讲。
- tomcat 4.0 安装到 win2k下如何做...请教
- 以下是个发mail的JSP,很简单,但是报错,请指点,谢谢
- 中文显示问题
for(int i=0;i<peoples.lenth;i++){
String sql="insert into table1 d='"+peoles[i]+"'";
stm.addBatch(sql);
}
stm.executeBatch();
PreparedStatement ps = null;
ResultSet rs = null;
sql = new StringBuffer();//insert
for (){
sql = "insert into table1(...) values(..." + peoples[i] + "...)";//...代表字段名或者字段的值
ps = DBCon.prepareStatement(sql.toString());
ps.execute();//or ps.executeQuery(), 我忘了^_^
}//select
sql = "select .. from table1";//...代表字段名或者字段的值
ps = DBCon.prepareStatement(sql.toString());
rs = ps.executeQuery();while (rs.next())
{
peoples[i] = rs.get(..);
}
//完善一下就应该ok了,不帮你写完整了。^_^