Hi,
I'm trying to get my products to display in three columns.
I have 24 products in a couple of catagories which display fine.
Question: how do i get other catagories with quantities of less or more than 24 items to display with out an error - i need the table to expand or contact according to number of items.
Thanks in advance.
<%
Set prodRS = Server.CreateObject( "ADODB.Recordset" )
prodRS.ActiveConnection = Con
DIM prodcat
sqlString = "SELECT product_id, product_picture, product_name " &_
"FROM Products WHERE product_category='" & cat & "' " &_
"AND product_status=1 " &_
"ORDER BY product_id "
prodRS.Open sqlString
%>
<table border="0" width="100%">
<%
FOR row = 1 TO 8
%>
<tr>
<%
FOR col = 1 TO 3
%>
<td valign="top"><%response.write prodRS( "product_name" )%></b>
<%prodcat = prodRS( "product_name" )%>
<% IF prodRS( "product_picture" ) <> "?????" THEN %>
<a href="product.asp?pid=<%=prodRS( "product_id" )%>"><IMG SRC="../thumbs/<%=prodRS( "product_picture" )%>s.jpg" border="1" align="center"></a></font>
<% END IF %>
<%
prodRS.MoveNext
NEXT
%>
</tr>
<%
NEXT
%>
</table>
I'm trying to get my products to display in three columns.
I have 24 products in a couple of catagories which display fine.
Question: how do i get other catagories with quantities of less or more than 24 items to display with out an error - i need the table to expand or contact according to number of items.
Thanks in advance.
<%
Set prodRS = Server.CreateObject( "ADODB.Recordset" )
prodRS.ActiveConnection = Con
DIM prodcat
sqlString = "SELECT product_id, product_picture, product_name " &_
"FROM Products WHERE product_category='" & cat & "' " &_
"AND product_status=1 " &_
"ORDER BY product_id "
prodRS.Open sqlString
%>
<table border="0" width="100%">
<%
FOR row = 1 TO 8
%>
<tr>
<%
FOR col = 1 TO 3
%>
<td valign="top"><%response.write prodRS( "product_name" )%></b>
<%prodcat = prodRS( "product_name" )%>
<% IF prodRS( "product_picture" ) <> "?????" THEN %>
<a href="product.asp?pid=<%=prodRS( "product_id" )%>"><IMG SRC="../thumbs/<%=prodRS( "product_picture" )%>s.jpg" border="1" align="center"></a></font>
<% END IF %>
<%
prodRS.MoveNext
NEXT
%>
</tr>
<%
NEXT
%>
</table>
Comment