标题: 一个简单的网上书城的例子(一)
啦啦
中校
Rank: 1



UID 10823
精华 2
积分 1636
帖子 787
威望 21
金币 806
热心 4
阅读权限 50
注册 2006-4-1
来自 武汉
状态 离线
一个简单的网上书城的例子(一)

数据库结构:
第一个库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
%>

顶部
[广告] 免费域名(Free Subdomain) 免费空间(Free hosting) PR查询(Google Pagerank)



当前时区 GMT+8, 现在时间是 2008-10-7 14:22
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号

Powered by Discuz! 5.5.0
清除 Cookies - 联系我们 - 网友俱乐部 - Archiver - WAP