当前位置: 首页 > 图文教程 > 网络编程 > ASP > 一个简单的网上书城的例子(一)

ASP
加密處理使密碼更安全
使用InstallShield制作ASP安装程序(1)
使用InstallShield制作ASP安装程序(2)
使用InstallShield制作ASP安装程序(3)
使用InstallShield制作ASP安装程序(4)
使用InstallShield制作ASP安装程序(5)
使用InstallShield制作ASP安装程序(6)
一个通用数据库显示程序
数据库远程控制的ASP实现
词语搭配游戏的制作(ASP)一
词语搭配游戏的制作(ASP)二
词语搭配游戏的制作(ASP)三
在ASP中使用Oracle数据库
在Web界面下如何生成像资源管理器一样的树形目录(版本2.0)
使用ASP建设私人搜索引擎
用EasyMailObject组件处理Exchange邮件源代码(1)
用EasyMailObject组件处理Exchange邮件源代码(2)
用EasyMailObject组件处理Exchange邮件源代码(3)
用EasyMailObject组件处理Exchange邮件源代码(4)
用EasyMailObject组件处理Exchange邮件源代码(5)

ASP 中的 一个简单的网上书城的例子(一)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 41 ::
收藏到网摘: n/a

  数据库结构:
第一个库shopbag.mdb,两个表:
buyiformation表存客户信息如下:
Name,Tel,Address,ProductID,Quatity,Sum
第二个表products存商品信息:
CategoryID(商品分类号),productid,productname,descrition,
ischeck(用户是否选这一商品),price(单价)

下面试一个工具文件!util.asp

<%
Sub ListCategory( conn )

   Set rs = conn.Execute( "Category" )
   While Not rs.EOF
%>
 <A HREF=buy.asp?CategoryID=<%=rs("CategoryID")%>&Description=<%=Server.URLEncode(rs("Description"))%>>
<%=rs("Description")%>
</A> 
<%
      rs.MoveNext
   Wend
End Sub

Sub PutToShopBag( ProductID, ProductList )
   If Len(ProductList) = 0 Then
      ProductList = "'" & ProductID & "'"
   ElseIf InStr( ProductList, ProductID ) <= 0 Then
      ProductList = ProductList & ", '" & ProductID & "'"
   End If
End Sub

%>