国产探花免费观看_亚洲丰满少妇自慰呻吟_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.




發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 望奎县| 张家港市| 台江县| 繁峙县| 淮滨县| 麟游县| 汉中市| 赤城县| 资源县| 常熟市| 清水河县| 汉寿县| 筠连县| 洮南市| 木兰县| 新巴尔虎左旗| 木兰县| 翁牛特旗| 佛山市| 开平市| 邢台市| 龙山县| 定襄县| 武陟县| 托克托县| 高清| 巩义市| 三河市| 临洮县| 泰和县| 甘肃省| 大庆市| 镇安县| 乡宁县| 柯坪县| 澄城县| 民丰县| 铜鼓县| 江陵县| 若尔盖县| 满洲里市|