© 1999-2048 dssz.net 粤ICP备11031372号
广辉新闻网 | 版主简介 | ||
姓名:堵广辉 | |||
<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:database"); Statement smt =con.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); String getplacarddata = "" ; %> <% String getnewsdata = "" ; getnewsdata = "SELECT * FROM news WHERE published = true " ; ResultSet newsrs =smt.executeQuery(getnewsdata) ;%> <% while(newsrs.next()){ String newsid =newsrs.getString("newsid") ; String newstitle =newsrs.getString("newstitle") ; %> <%=newstitle%> [<%=newsrs.getString("publishdate")%>] <%}%> |
173632005@qq.com 建议使用:1024 * 768 分辨率
<%@page contentType="text/html"%> <%@page pageEncoding="GB2312"%> <%@page import = "java.sql.*" %> <%@page import ="java.util.*,java.io.*"%> <%@page import ="javax.activation.*"%>非法进入或页面超时,请重新登录…
<%}else{%> <% String editType=request.getParameter("editType"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:database"); Statement smt =con.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); String editSQL = "" ; String msgid = request.getParameter("msgid") ; editSQL = "DELETE FROM message WHERE " + "msgid=" + msgid ; smt.execute(editSQL) ; out.println("留言已删除!") ;%> <%response.setHeader("Refresh","1;url=messagelist.jsp");%> <%}%> ...展开收缩