锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲日本无吗高清不卡,亚洲国产精品嫩草影院久久av,精品中文视频http://www.aygfsteel.com/human2008/category/28757.htmlzh-cnTue, 08 Jan 2008 15:21:28 GMTTue, 08 Jan 2008 15:21:28 GMT60JSP瀹炵幇璁哄潧鏍戝瀷緇撴瀯鐨勭畻娉?闈為掑綊) http://www.aygfsteel.com/human2008/archive/2008/01/08/173769.html鐏?鐏?Tue, 08 Jan 2008 12:07:00 GMThttp://www.aygfsteel.com/human2008/archive/2008/01/08/173769.htmlhttp://www.aygfsteel.com/human2008/comments/173769.htmlhttp://www.aygfsteel.com/human2008/archive/2008/01/08/173769.html#Feedback0http://www.aygfsteel.com/human2008/comments/commentRss/173769.htmlhttp://www.aygfsteel.com/human2008/services/trackbacks/173769.html瀹炵幇璁哄潧鏍戝瀷緇撴瀯鐨勭畻娉曞緢澶氾紝榪欓噷鏄竴涓笉鐢ㄩ掑綊瀹炵幇鏍戝瀷緇撴瀯鐨勭畻娉?/font>

1.婕旂ず琛ㄧ殑緇撴瀯錛?nbsp;

 銆銆銆琛ㄥ悕錛歮ybbslist 
銆銆銆瀛楁 銆銆銆銆鏁版嵁綾誨瀷銆銆璇存槑 
銆銆銆BBSID銆銆銆銆鑷姩緙栧彿 銆 
銆銆銆RootID 銆銆銆Int銆銆銆銆 鏍瑰笘ID錛屾湰韜負鏍瑰笘鍒橰ootID = BBSID 
銆銆銆FID銆銆銆銆銆Int 銆銆銆銆鐖跺笘ID錛屼笂涓灞傚笘瀛愮殑ID錛屽鏄牴甯栧垯FID = 0 
銆銆銆DEPTH銆銆銆銆Int 銆銆銆銆鏍瑰笘Level=0錛屽叾浠栦緷鎹洖澶嶇殑娣卞害閫掑 
銆銆銆BBSSubject 銆Char銆銆銆銆涓婚 



2.鍒涘緩琛紙鍙牴鎹琛ㄧ殑緇撴瀯鍦ˋCCESS涓垱寤鴻〃錛夛細 


 create table mybbslist ( 
銆forumID int(20) not null, 
銆bbsID int auto_increment primary key, 
銆rootid int(20) not null, 
銆fid int(20) not null, 
銆depth int(20) not null, 
銆userID int(20) not null, 
銆bbsUser varchar(24) not null, 
銆bbsSubject varchar(100) not null, 
銆bbsContent text, 
銆bbsTime varchar(30), 
銆bbsRead int(20), 
銆bbsReply int(20), 
INDEX forumID (forumID))  




3.婕旂ず璁哄潧鏍戝瀷緇撴瀯鐨凧SP紼嬪簭錛屾敞鎰忔紼嬪簭鍙涓涓牴璐磋繘琛屼簡婕旂ず錛堟暟鎹簱鐢ˋCCESS錛?

 <%@ page contentType="text/html;charset=gb2312" %> 
<%@ page import="java.io.*" %> 
<%@ page import="java.sql.*" %> 
<% 
 String driverName = "sun.jdbc.odbc.JdbcOdbcDriver"; 
 String connURL= "jdbc:odbc:cwb"; 
 Connection conn = null; 
 Statement stmt = null; 

int intRowCount; 
out.print("鏄劇ず璁哄潧鏍戝艦緇撴瀯"); 
out.print("<br><br>"); 
try { 
     Class.forName(driverName); 
     conn = DriverManager.getConnection(connURL); 
     stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
     String sql="select * from mybbslist order by rootid desc,depth,fid,bbsid"; 
     ResultSet rs = stmt.executeQuery(sql); 
     if (rs.next()){ 
                 rs.last(); 
                 intRowCount=rs.getRow(); 
                 out.print("璁哄潧鏍戜腑鏈?); 
                 out.print(intRowCount); 
                 out.print("涓彾瀛愯妭鐐?); 
                 rs.first(); 
                 int j=0; 
                 int Depth = 0; 
                 out.print("<ul>"); 
                 while(j<intRowCount){ 
                       int rsDepth=rs.getInt("depth"); 
                       if (rsDepth>Depth){ 
                                      out.print("<ul>"); 
                        } 
                        out.print("<li>"); 
                        String bbssubject=rs.getString("bbsSubject"); 
                        out.print(bbssubject); 
                        out.print("</li>"); 
                        Depth=rsDepth;
                        j=j+1; 
                        rs.next(); 
                 } 
                 for(int i=0;i<Depth+1;i=i+1) { 
                    out.print("</ul>"); 
                 } 
    }else{ 
            out.print("鏁版嵁搴撲腑鏃犺褰?); 
    } 
}catch (SQLException E) { 
      out.println("SQLException: " + E.getMessage()); 
      out.println("SQLState: " + E.getSQLState()); 
      out.println("VendorError: " + E.getErrorCode()); 

%> 
<% //鍏抽棴mysql榪炴帴 
try { 
      if(conn!=null)  conn.close(); 
} catch (Exception ex) { 
      System.err.println("closeConn: " + ex.getMessage()); 

%> 



鐏? 2008-01-08 20:07 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 台江县| 射洪县| 克山县| 金溪县| 张家港市| 措勤县| 平山县| 寿宁县| 阳泉市| 济南市| 仙桃市| 津市市| 京山县| 临沂市| 湘潭市| 信阳市| 子洲县| 达州市| 南充市| 宁津县| 马公市| 威信县| 永定县| 扎赉特旗| 遵化市| 商丘市| 鲜城| 临湘市| 阿拉善左旗| 金乡县| 辽阳县| 会同县| 雷波县| 赞皇县| 巴林左旗| 尤溪县| 湖北省| 新邵县| 惠安县| 淮北市| 敦化市|