PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/beta/admin/xml_InvoiceItemCategories.asp

http://github.com/khaneh/Orders
ASP | 28 lines | 26 code | 1 blank | 1 comment | 3 complexity | 238df6e60ca4a68d3ecca416ea737390 MD5 | raw file
 1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
 2<!--#include file="../config.asp" -->
 3<?xml version="1.0" encoding="windows-1256"?> 
 4<%
 5InvItemID=request("id")
 6if isNumeric(InvItemID) then
 7	InvItemID=clng(InvItemID)
 8else
 9	InvItemID=0
10end if
11'sql="SELECT * FROM InvoiceItems WHERE (ID='" & InvItemID &"') AND (Enabled=1)"
12
13mySQL="SELECT InvoiceItemCategories.* FROM InvoiceItemCategoryRelations INNER JOIN InvoiceItemCategories ON InvoiceItemCategoryRelations.InvoiceItemCategory = InvoiceItemCategories.ID WHERE (InvoiceItemCategoryRelations.InvoiceItem = '" & InvItemID &"')" 
14set rs=Conn.Execute(mySQL)
15if NOT rs.eof then
16%><Categories>
17<%
18	Do while NOT rs.eof
19		%><Category id="<%=rs("id")%>"><%=rs("name")%></Category> 
20		<%
21		rs.MoveNext
22	Loop
23%></Categories>
24<%
25end if
26rs.close()
27conn.close()
28%>