QUOTE(ksnight @ 29 Jan, 2007 - 08:19 AM)

Here is the code I have to list one type of supplier. I would like to list both types of suppliers on the page in different tables. I would assume that I would need to remove the "WHERE type1Supplier=-1" from the select statement. After I do that I am lost. I have thought about the different way's this could be done but nothing that I have tried seems to work.
CODE
<%
on error resume next
' brings suppliers by type
mySQL="SELECT * FROM suppliers WHERE SupplierType1=-1 ORDER BY supplierName"
call getFromDatabase(mySQL, rstemp, "listSupplierType1.asp")
%>
<!-- Display suppliers by type -->
<br><b>Type 1 Suppliers </b>
<%do while not rstemp.eof%>
<br /><br />
<a href="listProductsBySupplier.asp?idSupplier=<%=rstemp("idSupplier")%>"><%=rstemp("supplierName")%></a>
<%
rstemp.movenext
loop
call closeDb()
%>
I need to have two list that display two different types of suppliers not just one. Example would be a list of computer suppliers and another list of printer suppliers. Both list should direct the user to that suppliers page.
I have tried to make two different asp pages and include each in its own table but it times out when both pages are included. Works good with just one include. I would like to have a table cell display one supplier type and the other cell display the 2nd supplier type their are four different supplier types. You need to remove your where clause and put the returned data into a recordset so you can foreach through it and then output the links for each one dynamically.