PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/beta/inventory/xml_MaxID4newItems.asp

http://github.com/khaneh/Orders
ASP | 26 lines | 21 code | 4 blank | 1 comment | 5 complexity | 62dcceefde950fbc23c47eeb92b51656 MD5 | raw file
 1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
 2<!--#include file="../config.asp" -->
 3<%
 4if request("id")="" then
 5	response.write escape ("���� ��� " )
 6	response.end
 7end if 
 8
 9if not isnumeric(request("id")) then
10	response.write escape ("���! " )
11	response.end
12end if 
13
14sql="SELECT MAX(dbo.InventoryItems.OldItemID) + 1 AS maxID FROM dbo.InventoryItems INNER JOIN dbo.InventoryItemCategoryRelations ON dbo.InventoryItems.ID = dbo.InventoryItemCategoryRelations.Item_ID GROUP BY dbo.InventoryItemCategoryRelations.Cat_ID HAVING (dbo.InventoryItemCategoryRelations.Cat_ID = "& request("id") & ")"
15
16'response.write sql
17set rs=Conn.Execute(sql)
18if (rs.EOF) then
19	response.write escape ("")
20else
21    response.write escape( rs("maxID") )
22end if
23
24rs.close()
25conn.close()
26%>