制作我们自己的Ebay(拍卖系统)(6)
敬业的IT人
互联网
佚名
2008-4-14 17:36:41
Resolving Bids - Page 6
Chris Payne
September 11, 2000
Function ResolveBids(ItemID)
'Set variables and create objects
dim monIncrement, monHighPrice, intAvailable, intTotItems, flgQuit
dim blnResolved
'Assume bids are resolved
blnResolved = True
strConnectionString = "DSN=MyAuction;UID=username;PWD=password;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")
'Get information from items table
strSQL = "SELECT Increment, Available FROM tblAuctionItems WHERE " & _
"IID = " & ItemID
rst.open strSQL, strConnectionString
monIncrement = rst(0)
intAvailable = rst(1)
rst.close
'Find the highest bid and total number items bid for
strSQL = "SELECT max(WinPrice) AS WinPrice, sum(WinItems) as " & _
"WinItems FROM tblAuctionBids WHERE " & _
"ItemID = " & ItemID
rst.open strSQL, strConnectionString
monHighPrice = rst(0)
intTotItems = rst(1)
rst.close
'If a user with a higher max bid exists, then
' update their bid if and>
Chris Payne
September 11, 2000
Function ResolveBids(ItemID)
'Set variables and create objects
dim monIncrement, monHighPrice, intAvailable, intTotItems, flgQuit
dim blnResolved
'Assume bids are resolved
blnResolved = True
strConnectionString = "DSN=MyAuction;UID=username;PWD=password;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")
'Get information from items table
strSQL = "SELECT Increment, Available FROM tblAuctionItems WHERE " & _
"IID = " & ItemID
rst.open strSQL, strConnectionString
monIncrement = rst(0)
intAvailable = rst(1)
rst.close
'Find the highest bid and total number items bid for
strSQL = "SELECT max(WinPrice) AS WinPrice, sum(WinItems) as " & _
"WinItems FROM tblAuctionBids WHERE " & _
"ItemID = " & ItemID
rst.open strSQL, strConnectionString
monHighPrice = rst(0)
intTotItems = rst(1)
rst.close
'If a user with a higher max bid exists, then
' update their bid if and>
- 最新文章
- 制作我们自己的Ebay(拍卖系统)(5)[04-14]
- 制作我们自己的Ebay(拍卖系统)(4)[04-14]
- 制作我们自己的Ebay(拍卖系统)(3)[04-14]
- 用ASP创建日志文件(附源程序)[04-14]
- 在一个ASP页面停留的多少时间的程序[04-14]
- 趣味访客计数器设计两则[04-14]
- 相关文章
