修复所有数据库性能问题
This commit is contained in:
@@ -23,9 +23,7 @@
|
||||
<%
|
||||
request.setCharacterEncoding("utf-8");
|
||||
boolean flag = false;
|
||||
PreparedStatement sql = null;
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
|
||||
if (session.getAttribute("actualuser") == null) {
|
||||
out.println(
|
||||
"<script language=javascript>alert('登录超时 (1440 秒未活动)或未登录,请重新登录。');window.location.href='index.html'</script>");
|
||||
@@ -41,6 +39,10 @@
|
||||
String use = "root";
|
||||
String password = "";
|
||||
Class.forName(driver);
|
||||
try{
|
||||
PreparedStatement sql = null;
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
conn = DriverManager.getConnection(url, use, password);
|
||||
sql = conn.prepareStatement("select * from show_user where userName=? and VIP=1");
|
||||
sql.setString(1, users);
|
||||
@@ -51,6 +53,9 @@
|
||||
rs.close();
|
||||
sql.close();
|
||||
conn.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<!-- 判断是否是管理员 -->
|
||||
<%
|
||||
|
||||
Reference in New Issue
Block a user