% connect_db() %> <% Dim id Dim rs2 Dim catalog_name Dim new_product_catalog_id id = Request("id") If (Not isNumeric(id)) Or id = "" Then goBack("Parameter Error") End If id = CLng(id) sql = "select * from products where flag = 0 and id = " & id Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3 If rs.BOF And rs.EOF Then goBack("The product is not exists!") End If new_product_catalog_id = rs("catalog_id") sql = "select * from product_catalogs where id = " & rs("catalog_id") Set rs1 = Server.CreateObject("ADODB.Recordset") rs1.Open sql, conn, 3 If rs1.BOF And rs1.EOF Then goBack("The product is not exists!") End If catalog_name = rs1("catalog_name") new_catalog_id = rs1("id") sql = "update products set click_times = click_times + 1 where flag = 0 and id = " & id Set rs2 = Server.CreateObject("ADODB.Recordset") rs2.Open sql, conn, 3 %>
![]() |
|
|
|