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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Divison and ints (easy but I need coffee?) 1

Status
Not open for further replies.

nzgirl

Programmer
Feb 26, 2003
72
NZ
For a display I want to break my values up so three are displayed per line.
I currently have:
<tr>
<% count = 0
while not rs.EOF
if count /3 =1 then %>
</tr><tr>
<% end if %>
<td><% rs.Fields(&quot;Name&quot;) %></td>
<% count = count +1
rs.MoveNext
wend %>
</tr>

which works fine on the first group... but obviously 6/3 = 2
is there a way I can say &quot;if count /3 = whole number&quot; ?

Thanks :)
 
<tr>
<%
count = 0:count2=0
while not rs.EOF
if count /3 = count2 then
response.write &quot;</tr><tr>&quot;
count2=count2+1
end if %>
<td><%=rs.Fields(&quot;Name&quot;)%></td>
<% count = count +1
rs.MoveNext
wend %>
</tr>




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top