ASP页面以前是别人写的,我不懂这块,但是现在需要改一点东西,请大家帮忙
<tablewidth="722"align="center"><tr><tdcolspan="2"><formname="formxm"method="post"act...
<table width="722" align="center">
<tr>
<td colspan="2"> <form name="formxm" method="post" action="index.asp?id=1">
请输入用户姓名
<input type="text" name="xingming" size="10">
<input type="submit" name="chaxun" value="查询">
</form></td>
</tr>
<tr>
<%if xingming<>"" then%>
<td valign="top"><font color="#FF0000">查询结果</font></td>
<td width="652">
<%
mypage=request.QueryString("whichpage")
if mypage="" then
mypage=1
end if
mypagesize=request.QueryString("pagesize")
if mypagesize="" then
mypagesize=10
end if
sql="select xm,dw,id from tuhajingkong where xm like '%"&xingming&"%'"
set rs=server.createobject("adodb.recordset")
rs.cursorlocation=3
rs.cachesize=5
rs.open sql,conn
if rs.eof then
response.Write("无记录")
response.End()
end if
rs.movefirst
rs.pagesize=mypagesize
maxcount=cint(rs.pagecount)
rs.absolutepage=mypage
howmanyrecs=0
howmanyfields=rs.fields.count-1
response.Write(xingming&" ")
response.Write("第"&mypage&"页 共"&maxcount&"页<br>")
%>
<table border="1">
<tr>
<td width="100"><font color="#990000">姓名</font></td>
<td width="150"><font color="#990000">单位</font></td>
<td width="100"><font color="#990000">证书编号</font></td>
<td width="100"><font color="#990000">证书</font></td>
</tr>
<%
do while not rs.eof and howmanyrecs<rs.pagesize
%>
<tr>
<%
for i=0 to howmanyfields
%>
<td valign="top"><%if rs(i)<>"" then response.Write rs(i) else response.Write "\" end if%></td>
<%next%>
<td width="100"><font color="#990000"><a href="zhengshu\00000001.jpg" target="_blank">点击查看</a></font></td>
</tr>
<%
rs.movenext
howmanyrecs=howmanyrecs+1
loop
rs.close
set rs=nothing
%>
</table>
需要修改<a href="zhengshu\00000001.jpg" target="_blank">点击查看</a> 改为数据库查询出的路径,将00000001改为前面sql查出的id,以显示查询出来的图片。
我不懂这块,请各位高手指点 展开
<tr>
<td colspan="2"> <form name="formxm" method="post" action="index.asp?id=1">
请输入用户姓名
<input type="text" name="xingming" size="10">
<input type="submit" name="chaxun" value="查询">
</form></td>
</tr>
<tr>
<%if xingming<>"" then%>
<td valign="top"><font color="#FF0000">查询结果</font></td>
<td width="652">
<%
mypage=request.QueryString("whichpage")
if mypage="" then
mypage=1
end if
mypagesize=request.QueryString("pagesize")
if mypagesize="" then
mypagesize=10
end if
sql="select xm,dw,id from tuhajingkong where xm like '%"&xingming&"%'"
set rs=server.createobject("adodb.recordset")
rs.cursorlocation=3
rs.cachesize=5
rs.open sql,conn
if rs.eof then
response.Write("无记录")
response.End()
end if
rs.movefirst
rs.pagesize=mypagesize
maxcount=cint(rs.pagecount)
rs.absolutepage=mypage
howmanyrecs=0
howmanyfields=rs.fields.count-1
response.Write(xingming&" ")
response.Write("第"&mypage&"页 共"&maxcount&"页<br>")
%>
<table border="1">
<tr>
<td width="100"><font color="#990000">姓名</font></td>
<td width="150"><font color="#990000">单位</font></td>
<td width="100"><font color="#990000">证书编号</font></td>
<td width="100"><font color="#990000">证书</font></td>
</tr>
<%
do while not rs.eof and howmanyrecs<rs.pagesize
%>
<tr>
<%
for i=0 to howmanyfields
%>
<td valign="top"><%if rs(i)<>"" then response.Write rs(i) else response.Write "\" end if%></td>
<%next%>
<td width="100"><font color="#990000"><a href="zhengshu\00000001.jpg" target="_blank">点击查看</a></font></td>
</tr>
<%
rs.movenext
howmanyrecs=howmanyrecs+1
loop
rs.close
set rs=nothing
%>
</table>
需要修改<a href="zhengshu\00000001.jpg" target="_blank">点击查看</a> 改为数据库查询出的路径,将00000001改为前面sql查出的id,以显示查询出来的图片。
我不懂这块,请各位高手指点 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询