国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

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

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

2019-11-18 22:02:16
字體:
來源:轉載
供稿:網友
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.




發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 南郑县| 通海县| 海原县| 耒阳市| 时尚| 伊宁市| 天峻县| 博白县| 额济纳旗| 自贡市| 青龙| 秀山| 海口市| 皮山县| 德昌县| 阿坝县| 赤壁市| 沙湾县| 瑞丽市| 壤塘县| 武乡县| 姜堰市| 抚顺县| 东明县| 滦南县| 阜南县| 汝城县| 淮北市| 白玉县| 吉首市| 南部县| 竹北市| 上高县| 三亚市| 浦东新区| 光泽县| 临潭县| 灌阳县| 新泰市| 中山市| 张家口市|