欢迎光临
我们一直在努力

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

建站超值云服务器,限时71元/月

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

%>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 一个简单的网上书城的例子(一)!
分享到: 更多 (0)