Jamie_pro
2017-11-11 06:50JavaEE课程设计中遇到的问题,求大神指点:
代码如下:
public String Query(HttpServletRequest request){
String html="";
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
String type=request.getParameter("type");
String content=request.getParameter("content");
String sql="select * from tellist where '"+type+"'='"+content+"'";
try{
Statement pstmt=con.createStatement();
ResultSet rs1=pstmt.executeQuery(sql);
html+="
id</ | 姓名 | 性别 | 年龄 | 电话 | 邮箱 | 住址 |
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- idea中配置的tomcat有问题
- java
- intellij-idea
- tomcat
- 2个回答
- JAVAEE程序性能问题
- 企业应用
- 0个回答
- 请问一个Eclipse javaee开发工具的问题,不是MyEclipse
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 0个回答
- JAVAEE项目报错找不到位置
- intellij-idea
- 8个回答
- JavaEE中servlet的版本问题
- servlet
- web-app
- java-ee
- tomcat
- 3个回答
换一换