bbs系统可留言

时间:2015-06-06 07:58:28
【文件属性】:

文件名称:bbs系统可留言

文件大小:659B

文件格式:JAVA

更新时间:2015-06-06 07:58:28

bbs系统可留言

bss系统管理的片段 package bbs.xzit.dbc; import java.sql.*; import java.util.Iterator; import java.util.LinkedHashMap; public class DatabaseUtil { private DatabaseConnection dbc; public DatabaseUtil(){ dbc = new DatabaseConnection(); } // DML DDL ---insert update delete //insert into table(f1,f2...) values(?,?...?) public int executeUpdate(String sql,Object[] param) throws Exception { Connection connect = dbc.getConn(); int num = 0; PreparedStatement pstmt = null; try { pstmt = connect.prepareStatement(sql); for(int i=0;i0) orderStr = "order by "; while(keys.hasNext()){ String key =(String)keys.next(); String keyValue = (String)order.get(key); orderStr = orderStr + key +" " + keyValue +","; } orderStr.substring(0, orderStr.length()-2); sql = sql + orderStr; try { pstmt = connect.prepareStatement(sql); for(int i=0;i


网友评论