亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

制作我們自己的Ebay(拍賣系統)(7)

2019-11-18 22:01:40
字體:
來源:轉載
供稿:網友
Chris Payne

September 11, 2000

Well, now your auction can run for an indefinite time. People can keep placing bids until you decide to
stop them (good for the seller, but makes bidders kind of unhappy, to say the least). Let's discuss the
mechanisms for stopping an auction.

There are two easy ways to do it. The first, and easiest to perform, though requiring more manual
intervention in the long run, is to simply build in an "Active" bit field into your tblAuctions table.
When you decide to stop the auction, flip the bit, and the auction is over. (You'll also have to add some
code to make sure that the DoBids and ResolveBids functions don't Operate on closed auctions.) Then simply
query the database, find out the winner(s), and let them and the seller know. Easy as pie.

The second method is to go by the end date the seller specifies (better business, believe me). To do this,
you can manually stop the auction (via the PRocess above) when the appropriate date comes, or you can
schedule a task to turn an auction off at the appropriate times. There are a few ways to do this, via your
database program and the Windows NT Task Scheduler, so I won't go through each one. You could simply set
the script to run every midnight or so to stop the auction and determine the winners.

If you let the seller specify an exact time for the auction to end, then you're introducing a whole new
set of complications. One way to handle this is to programmatically set a scheduled task as soon as the
seller submits the auction, for the end date of the auction. This requires minimum intervention, but
requires you to know how to do that (for documentation on the Task Scheduler, read this MSDN article).
Another method is to create your own specific version of task scheduler; create a small program that will
run in the background and watch the times on auctions. When an auction end date passes, flip the bit.

Okay, so the auction is over. Now what?

Assuming that you would like minimal manual intervention, and you don't really care who wins (like the
head guys at Ebay care who wins every single auction), then you could create a function to send alerts to
the winner(s) and seller that will kick off when the auction is over. This function could also in turn
kick off some type of payment system, but that is beyond the scope of this article. Let's look at the
function:



Function SelectWinners(AuctionID, itemID)


'Set variables and create objects
dim totItems, intAvailable
totItems = 0
strConnectionString = "DSN=MyAuction;UID=username;PWD=passWord;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")


'Find the number of items available
strSQL = "SELECT Available FROM tblAuctionItems WHERE " & _
"IID = " & ItemID
rst.open strSQL, strConnectionString
intAvailable = rst(1)
rst.close


'find the winners
'If two customers bid the same amount, the customer requesting
more items will win. If still tied, the customer placing the
earliest bid will win
strSQL = "SELECT UID, WinPrice, WinItems FROM tblAuctionBids " & _
"WHERE IID = " & itemID & " ORDER BY WinItems DESC, Time"


rst.open strSQL, strConnectionString
if not rst.eof then
do until rst.eof OR totItems >= intAvailable
'Keep a running tally of items distributed
totItems = totItems + rst(2)
If totItems <= intAvailable then 'This buyer won
'Send an email alerting this buyer
call SendWinningEmail(rst(0))
End if
rst.movenext
loop
end if


End Function


This is a pretty simple function. Simply loop through the bids in the correct order (by number of items
won first, and then by date), and alert the buyers that they've won. Once the number of items bid for gets
higher than the number of items available, every one else loses, and you can stop the loop. I won't go
into the SendWinningEmail() function, but all it does is send the user specified by rst(0) an email that
says they've won and for how much and how many. (For an example using email, check out this WDVL article.)




發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
亚洲另类xxxx| 成人a视频在线观看| 日韩在线欧美在线国产在线| 欧美激情在线一区| 亚洲精品成人av| 91精品国产色综合| 亚洲美女福利视频网站| 精品人伦一区二区三区蜜桃免费| 91精品国产色综合久久不卡98| 国产91色在线|免| 欧美日韩国产在线| 亚洲影视中文字幕| 一本久久综合亚洲鲁鲁| 久久久国产一区| 国产精品大陆在线观看| 日韩亚洲欧美中文在线| 欧美一区二区三区四区在线| 在线看国产精品| 国外成人免费在线播放| 欧美裸体xxxx极品少妇软件| 国内成人精品视频| 91精品国产综合久久久久久蜜臀| 麻豆乱码国产一区二区三区| 亚洲性夜色噜噜噜7777| 欧美视频精品一区| 亚洲人成绝费网站色www| 日韩美女免费视频| 国产一区二区三区在线看| 日韩专区在线播放| 中文国产亚洲喷潮| 欧美一级在线亚洲天堂| 成人午夜高潮视频| 欧美精品在线网站| 亚洲最大福利视频| 国产成人精品av| 国产视频福利一区| 国产精品久久一区主播| 久久亚洲一区二区三区四区五区高| 日韩美女视频免费在线观看| 久久久精品欧美| 日韩欧美在线视频免费观看| 久久久久久久久久av| 国产有码一区二区| 日韩成人av网址| 国产一区玩具在线观看| 国外成人在线播放| 91av在线国产| 亚洲国产精品专区久久| 欧美成在线观看| 亚洲欧美三级伦理| 538国产精品一区二区免费视频| 色偷偷av一区二区三区| 亚洲日本成人女熟在线观看| 热久久这里只有精品| 色综合五月天导航| 国产精品7m视频| 欧美做受高潮电影o| 国产精品678| 亚洲图片欧美午夜| 国产欧美亚洲视频| 国产精品wwww| 北条麻妃一区二区三区中文字幕| 亚洲综合日韩中文字幕v在线| 2019亚洲日韩新视频| 日韩av电影手机在线| 美女黄色丝袜一区| 成人精品久久av网站| 欧亚精品在线观看| 亚洲欧美激情视频| 亚洲第一精品久久忘忧草社区| 欧美xxxx18性欧美| 国产欧美亚洲视频| 亚洲日本成人网| 久久国产视频网站| 在线观看日韩视频| 北条麻妃久久精品| 国产91免费观看| 欧美黑人巨大精品一区二区| 538国产精品一区二区在线| 米奇精品一区二区三区在线观看| 久久免费视频在线观看| 97精品免费视频| 日韩在线观看免费av| 亚洲电影成人av99爱色| 欧美日韩国产色| 亚洲天堂第二页| 91av在线免费观看视频| 中文字幕成人在线| 日韩视频在线观看免费| 清纯唯美日韩制服另类| 一区二区三区视频免费| 韩国v欧美v日本v亚洲| 国产噜噜噜噜噜久久久久久久久| 国产精品亚洲视频在线观看| 日韩成人免费视频| 日韩麻豆第一页| 欧美国产日韩xxxxx| 亚洲乱亚洲乱妇无码| 国内精久久久久久久久久人| 亚洲图片制服诱惑| 日本视频久久久| 亚洲精品国产精品国产自| 91香蕉嫩草神马影院在线观看| 亚洲色图国产精品| 日本精品一区二区三区在线播放视频| 成人激情在线观看| 国产欧美日韩精品在线观看| 国产有码在线一区二区视频| 国产精品男女猛烈高潮激情| 亚洲香蕉成视频在线观看| 欧美性生交大片免费| 国产97在线播放| 久久亚洲精品中文字幕冲田杏梨| 亚洲毛片在线看| 亚洲国产另类久久精品| 国产成人激情视频| 久久人人爽亚洲精品天堂| 亚洲va欧美va国产综合剧情| 一本一本久久a久久精品综合小说| 国产亚洲精品91在线| 亚洲第一视频在线观看| 国产精品久久久久久久久久久新郎| 在线视频免费一区二区| 欧美国产高跟鞋裸体秀xxxhd| 久久这里只有精品99| 久久久精品视频在线观看| 久久久久一本一区二区青青蜜月| 日韩激情视频在线| 狠狠色香婷婷久久亚洲精品| 国产午夜精品一区二区三区| 韩国三级日本三级少妇99| 成人免费激情视频| 欧美性少妇18aaaa视频| 欧美裸体xxxx极品少妇软件| 国产mv久久久| 最近更新的2019中文字幕| 96sao精品视频在线观看| 操人视频在线观看欧美| 欧美怡春院一区二区三区| 国产精品爱啪在线线免费观看| 欧美日韩在线影院| 欧美黄色片免费观看| 久久精品国产v日韩v亚洲| 国产精品国产三级国产aⅴ9色| 亚洲护士老师的毛茸茸最新章节| 亚洲iv一区二区三区| 日韩亚洲国产中文字幕| 日韩电视剧在线观看免费网站| 日韩精品在线免费播放| 超薄丝袜一区二区| 国产91成人video| 日韩av在线最新| 久久久久久综合网天天| 国产99久久精品一区二区永久免费| 全亚洲最色的网站在线观看| 免费91麻豆精品国产自产在线观看| 日韩一区二区三区在线播放| 中文字幕精品网| 久久乐国产精品| 国产精品久久久久77777| 日韩禁在线播放| 欧美性视频网站| 日韩av综合网| 亚州精品天堂中文字幕|