人民币大写转化函数(ASP版和JavaScript版)
作者:admin 日期:2010-08-18
ASP截取文章一部分显示(无损HTML)
作者:admin 日期:2010-08-06
ASP的一些常用的自定义函数
作者:admin 日期:2010-08-06
一个实用的ASP多表查询例子
作者:admin 日期:2010-08-02
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/ShowUserLogin.asp"-->
<!--#include file="inc/code.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="img.inc"-->
<!--#include file="scroll.asp"-->
<!--#include file="showAD.asp"-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" class="classborder">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="91%"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" align="center" class="touyingzhi"><img src="image/ico8.gif" width="9" height="12">
</td>
<td class="touyingzhi">OTC类招商</td>
</tr>
</table></td>
<td width="9%"><a href="otc.asp"><img src="image/MORE6.gif" width="44" height="12" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td class="left-border" style="padding:5px">
<%
dim rszs,sqlzs,i7,row7
i7=1
row7=3
set rszs=Server.CreateObject("ADODB.recordset")
sqlzs="select top 21 id,药品名称,图片,发布时间,发布人,UserName,comane,somane,Phone from main,[user] where (main.发布人 = user.UserName) and 类别=false and (大类='化学药品' or 大类='中药产品') and 审核=true order by ID desc"
rszs.open sqlzs,conn,1,1
if rszs.eof and rszs.bof then
response.Write("暂无任何招商信息")
end if
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<%Do While Not rszs.EOF%>
<td align="center" <%if i7 mod 3<>0 then response.write"style='border-right:solid 1px #d7d7d7'" end if%>>
<div align="conter" style="width:170px;height:23px;border-bottom:solid 1px #e8e8e8;padding-top:3px;">
<%'if rszs("图片")<>"nopic.gif" then response.Write"<img src='image/pic.gif' alt='有产品图片'>"end if%>
<%'if datevalue(rszs("发布时间"))=date() then response.Write"<font color=red> new</font>"%>
<a href="yp_show.asp?id=<%=rszs("ID")%>" target="_blank"><img src="UploadFiles/<%= rszs("图片") %>" width="168" height="63" border="0"></a><br/><a href="yp_show.asp?id=<%=rszs("ID")%>" target="_blank"><%=cutstr(rszs("药品名称"),10)%></a> <br/>
<%if rszs("comane")<>"" then response.write rszs("comane") else response.write "联系人:"&rszs("somane")&" 电话:"&rszs("Phone") end if%>
</div>
</td>
<%
if i7 mod row7=0 then
response.write"</tr>"
end if
i7=i7+1
rszs.movenext
loop
rszs.close
set rszs=nothing
%>
</tr>
</table></td>
</tr>
</table>
</td>
<%
conn.close
set conn=nothing
%>

数据库结构图
Tags: 多表查询
程序代码







