我在显示数据库图片时想把数据库其他数据也显示到网页上~怎么只会得图片其他数据看不到~急求喔~
代码:
<%
option explicit
dim rs,sql,conn
dim sid
sid=trim(request("id"
)
%>
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("ADODB.Recordset"
sql="select*from photo where id="&sid
rs.open sql,conn,1,1
Response.ContentType="image/jpeg"
Response.BinaryWrite rs("img"
.getChunk(8000000)
Response.write"<br>"
rs.close
set rs=nothing
set conn=nothing
%>
<!--#include file="conn.asp"-->
<table height="200" width="717">
<!--DWLayoutTable-->
<tr><td width="707" height="100"></td></tr></table>
<table height="200" width="719">
<!--DWLayoutTable-->
<tr>
<td width="709" height="153" valign="top">你的图片信息:
<%
Dim sCome,sPicname,sContent
sid=trim(request("id"
)
set rs=server.CreateObject("ADODB.Recordset"
sql="select*from photo where id="&sid
rs.open sql,conn,1,1
if not rs.eof then
sCome=rs("come"
sPicname=rs("picname"
sContent=rs("content"
Response.write"<table><tr><td>来源:</td><td>"&sCome&"</td><td>图名:</td><td>"&sPicname&"</td></tr><tr><td>简介:</td><td>"&sContent&"</td></table>"
Response.end
rs.close
end if
%>
</tr><tr><td height="39" valign="top"></td>
</table>