丛
丛艳全
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@ page contentType="text/html;
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<%@ page import="java.sql.*"%>
<%!String t,m=null,q,ss;%>
<%!int s;%>
<%!ResultSet rs;%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<META HTTP-EQUIV="refresh"
CONTENT="10"/>
<title>无标题文档</title>
<style type="text/css">
<!--
.header {font-family: Tahoma, Verdana;
font-size: 9pt;
color: #FFFFFF;
background-color: #69C37C
}
.style1 {color: #FF0000}
.style6 {color: #666666}
body {
background-color: #D2FFFF;
}
-->
</style>
</head>
<body>
<p>
<%
Connection conn;
Statement stmt;
String sql;
m=request.getParameter("weihao1"
if(m==null){
m="";
}
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
conn=DriverManager.getConnection("jdbcdbc:login","sa","sa"
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
sql="select * from edu where Education like '%"+m+"%'";
rs=stmt.executeQuery(sql);
if (rs.next())
{
ss =rs.getString("Education"
}
%>
</p>
<table style="BORDER-COLLAPSE: collapse"
borderColor=#808080 cellPadding=5 width="242"
border=1>
<tr>
<td>
<table width=100% border=0 align="center">
<tr>
<td align="center"
class="header"
colspan=2>位号实时状态</td>
</tr>
<tr>
<td width="36%"
align="right"><span class="style6">位号1:</span></td>
<td width="64%"><%=ss%></td>
</tr>
<tr>
<td align="center"
colspan=2>
<form name="form1"
method="post"
action="sm.jsp">
<input type="submit"
name="Submit"
value="返回">
</form></td>
</tr>
</table></td>
</tr>
</table>
<p> </p>
<p>
</p>
</body>
</html>
帮帮忙啊
看一看那个条语句错了啊
为什么不走这条语句:sql="select * from edu where Education like '%"+m+"%'";
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<%@ page import="java.sql.*"%>
<%!String t,m=null,q,ss;%>
<%!int s;%>
<%!ResultSet rs;%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<META HTTP-EQUIV="refresh"
CONTENT="10"/>
<title>无标题文档</title>
<style type="text/css">
<!--
.header {font-family: Tahoma, Verdana;
font-size: 9pt;
color: #FFFFFF;
background-color: #69C37C
}
.style1 {color: #FF0000}
.style6 {color: #666666}
body {
background-color: #D2FFFF;
}
-->
</style>
</head>
<body>
<p>
<%
Connection conn;
Statement stmt;
String sql;
m=request.getParameter("weihao1"
if(m==null){
m="";
}
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
conn=DriverManager.getConnection("jdbcdbc:login","sa","sa"
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
sql="select * from edu where Education like '%"+m+"%'";
rs=stmt.executeQuery(sql);
if (rs.next())
{
ss =rs.getString("Education"
}
%>
</p>
<table style="BORDER-COLLAPSE: collapse"
borderColor=#808080 cellPadding=5 width="242"
border=1>
<tr>
<td>
<table width=100% border=0 align="center">
<tr>
<td align="center"
class="header"
colspan=2>位号实时状态</td>
</tr>
<tr>
<td width="36%"
align="right"><span class="style6">位号1:</span></td>
<td width="64%"><%=ss%></td>
</tr>
<tr>
<td align="center"
colspan=2>
<form name="form1"
method="post"
action="sm.jsp">
<input type="submit"
name="Submit"
value="返回">
</form></td>
</tr>
</table></td>
</tr>
</table>
<p> </p>
<p>
</p>
</body>
</html>
帮帮忙啊
看一看那个条语句错了啊
为什么不走这条语句:sql="select * from edu where Education like '%"+m+"%'";