jsp+mysql实现删除功能 - Java / Web 开发
删除页面的处理:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>user_del_check</title>
</head>
<body>
<%
String s_un=request.getParameter("un");
Class.forName("org.gjt.mm.mysql.Driver");
Connection dbConn=DriverManager.getConnection("jdbc:mysql://localhost:3306/test?user=root&password=root&useUnicode=true&characterEncoding=utf-8");
Statement stmt=dbConn.createStatement();
String strSql="delete from users2 where un like'"+s_un+"'";
// PreparedStatement stmt=dbConn.prepareStatement(strSql);
stmt.executeUpdate(strSql);
stmt.close();
dbConn.close();
out.println("删除成功!");
&nb
相关问答:
本人正在用Java做一个C/S架构的项目,
可是由于项目比较大,前期对架构的设计尤其重要,因为后期可能随时会加个功能或者去掉某些功能。
所以特地寻求如何设计C/S的架构使程序更加面向对象更加易于维 ......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
table怎么绑定数据库,并且用JavaScript实现翻页。。。。。。。。。。JavaScript能向JSP页面传递参数吗
你说的问题有点那个。。,不好回答。。。。
jsp中table是需要html代码与页面端获取数据库查询后的信息进行 ......
有谁用java做过打印发票的程序,感觉这方面不是很好控制,希望给点建议,最好能给出代码
简单点就调用window.print()
你也可以把下面代码放到你JSP中:
<html>
<head>
<title> ......