Hi all,
I have this code here that collects rs1("ProdTypeID") columns which contain a varchar such as (1, 2, 3, ...) and assigns each line to a var strProdTid, then break the string down to bit by using Split, and use each number in the string to locate info by using sql on the below
<%
do while not rs1.eof
strProdTid = rs1("ProdTypeID")
response.Write(strProdTid)
arrNums = Split(strProdTid, ", ", -1, 1)
For Each strOneNum in arrNums
sql = "SELECT * FROM tblProductType WHERE ProdTypeID = " & strOneNum
Set rs5 = objConn.Execute(sql)
%>
<a href="default.asp?printer=1&ManuID=<% = request.querystring("ManuID") %>&ProdTypeID=<% = rs5("ProdTypeID") %>"><% =rs5("ProdTypeName") %></a><br>
<%
Next
rs1.movenext
loop
%>
My problem is whatever in the strings and all columns, they will be all shown in the output. ie:
1
2
2, 3
My question is how can I only allow different data on a screen, ie:
1
2
3
Thanks!!!
I have this code here that collects rs1("ProdTypeID") columns which contain a varchar such as (1, 2, 3, ...) and assigns each line to a var strProdTid, then break the string down to bit by using Split, and use each number in the string to locate info by using sql on the below
<%
do while not rs1.eof
strProdTid = rs1("ProdTypeID")
response.Write(strProdTid)
arrNums = Split(strProdTid, ", ", -1, 1)
For Each strOneNum in arrNums
sql = "SELECT * FROM tblProductType WHERE ProdTypeID = " & strOneNum
Set rs5 = objConn.Execute(sql)
%>
<a href="default.asp?printer=1&ManuID=<% = request.querystring("ManuID") %>&ProdTypeID=<% = rs5("ProdTypeID") %>"><% =rs5("ProdTypeName") %></a><br>
<%
Next
rs1.movenext
loop
%>
My problem is whatever in the strings and all columns, they will be all shown in the output. ie:
1
2
2, 3
My question is how can I only allow different data on a screen, ie:
1
2
3
Thanks!!!