制作我们自己的Ebay(拍卖系统)(4)

丿Mars丶枫眠

丿Mars丶枫眠

2016-01-29 17:21

制作我们自己的Ebay(拍卖系统)(4),制作我们自己的Ebay(拍卖系统)(4)
  First, we'll discuss the easy part. You'll have to create a few forms - one for the users to register (that is, get themselves into our AuctionUsers table), and one for sellers to post their info. These forms should be easy to create if you know how to handle forms (check out this WDVL article for more information). Basically, you should collect all the information from the forms and update the appropriate tables:



'Set variables and create object
strConnectionString = "DSN=MyAuction;UID=username;PWD=password;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")


'Insert info into auction table
strSQL = "INSERT INTO tblAuctions (StartDate, EndDate, SellerID)
VALUES ('" & Request.Form("StartDate") & "', '" & Request.Form("EndDate")
& "', " & SellerID & ")"


rst.open strSQL, strConnectionString


'Get the ID of the auction we just entered
strSQL = "SELECT max(AID) as AID FROM tblAuctions"
rst.open strSQL, strConnectionString
intAID = rst(0)
rst.close


'Insert item info
strSQL = "INSERT INTO tblAuctionItems (AID, Name, Description, " & _
"MinPrice, Increment, Available)" & _
"VALUES (" & intAID & ", '" & Request.Form("ItemName") & _
"', '" & Request.Form("ItemDescription") & "', '" & _
Request.Form("MinPrice") & "', '" & Request.Form("Increment")
& _
"', " & Request.Form("Available") & ")"


rst.open strSQL, strConnectionString


'Clean up
set rst = nothing

The bids are a bit harder to manage. Let's look at these in more detail.



 
展开更多 50%)
分享

猜你喜欢

制作我们自己的Ebay(拍卖系统)(4)

ASP
制作我们自己的Ebay(拍卖系统)(4)

制作我们自己的Ebay(拍卖系统)(6)

ASP
制作我们自己的Ebay(拍卖系统)(6)

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

制作我们自己的Ebay(拍卖系统)(7)

ASP
制作我们自己的Ebay(拍卖系统)(7)

制作我们自己的Ebay(拍卖系统)(3)

ASP
制作我们自己的Ebay(拍卖系统)(3)

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

制作我们自己的Ebay(拍卖系统)(5)

ASP
制作我们自己的Ebay(拍卖系统)(5)

制作我们自己的Ebay(拍卖系统)(8)

ASP
制作我们自己的Ebay(拍卖系统)(8)

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

破解XP组策略的锁死难题

破解XP组策略的锁死难题

asp生日自动提醒小程式

asp生日自动提醒小程式
下拉加载更多内容 ↓