The database is Test.mdb, where table [PRIC] records items and price information in a certain period (assuming a price of each commodity)
The table includes the following field Price (price) SHANG_ID (corresponding product ID) P_TIME (time of this price); please enter it yourself by the specific data; (Graph, non-columnar).
<% if Request ("TYR") = "" "=" "" or request ("shid" = "" "or not isnumeric (Request" TYR ")) or not isnumeric (Request (" Shid ") theresponse.write" parameter error, please confirm that you entered the right URL. "Response.Endend IFDIM CONN, Constr , dbdb = "test.mdb" set conn = server.createObject ("adoDb.connection") constr = "provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath (db) Conn (DB) Conn.open constrib Err THEN Err.clear conn.close set conn = Nothing response.write "temporarily unable to access the database, please try again later." Response.Endend IF
'Above is the connection database part
SET RSTEMP = Conn.execute ("SELECT TOP 1 Price, P_TIME FROM =" & Request ("Shid") & "And Year (P_TIME) =" & Request ("Tyr") & "And Month (p_time) = "& Request (" TMON ") &" Order By Price Desc "Ttop = RSTEMP (0) SET RS = Server.createObject (" AdoDb.Recordset ") SQL =" SELECT PRICE, P_TIME, SHANG_ID FROM [PRIC] Where Shang_ID = "& Request (" Shid "&" and Year (p_TIME) = "& Request (" TYR ") &" And Month (p_time) = "& Request (" TMON ") &" RS.Open SQL, CONN, 1, 1i = 0 do while not = re ("price") i = i 1k = 200 80 * ij = CINT (2200- (pRIC / TTOP) * 2000) TZB = TZB & K & K & K & K & K "& J &" "rs.movenextloop%>