Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Out Data with Columns

Status
Not open for further replies.

Figzus

Programmer
Mar 21, 2005
36
0
0
US
I have this database that populates a webpage with available topics. Im trying to get it into two columns with the first one going into a column called cola and the second one going into a column called colb and the third back into the column cola and so forth. How do I get it so that every other one goes into the columns. Thanks
 
Take a look at the Mod operator.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Really dumb question but what is the Mod operator?
 
recnum Mod 2 will return either 0 or 1 depending of recnum is even or odd.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Okay I think I have it but I just want to make sure. So in my my Do While Not I need something like

<%
if NodeID Mod 2 Then %>
<dt class="cola">
<%Response.Write "<a href=""MOWebIndex2.asp?NodeID="&NodeID&""">"&NodeName&"</a>"
rsMOWebIndex.MoveNext
%>
</dt>

<%Loop%>

Sorry I just never heard of the Mod Operator before and Im just trying to get the data to format correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top