"Anthony Jones" <An*@yadayadayada.comwrote in message
news:OS**************@TK2MSFTNGP04.phx.gbl...
>
"Jeff" <gi*****@adelphia.netwrote in message
news:uK******************************@adelphia.com ...
>hey gang. i have a question that is probably simple, and i could do it at
one time, but i forget how.
ok, how to explain
i need to retrieve records from a db. which is no problem. but instead of
displaying them with normal rows, i need to display them across 2
columns,
then down.
here is the example
http://scrimwars.gig-gamers.com/test1.asp
this way, with the sort, i can show 1 and 2 on the same line... 3 and 4
on
the same line and so on.
i know it will have to do with an i MOD, but not sure how to set it up.
can someone get me going here. here is what i have so far.
<%
Set matches1 = Conn.Execute("SELECT clan_initials FROM clans ORDER BY
wins
desc")
i = 1
DO UNTIL matches1.EOF
IF NOT i MOD 2 = 0 THEN
opposition = matches1.Fields("clan_initials").Value
%>
not not sure how to set the table up here
See my answer to subject 'Qry data to Page' posted by BaWork on 20 Nov
2006
02:48 GMT
The advantage to using a Mod is that the number of columns can be changed
by
simply changing the operand in the Mod function.
i have looked at that. the scripting makes sense.
i guess i am just having a problem with the html part.
i can't get it to put "against" between the two columns. let me show my
code.
<%
Set teams = Conn.Execute("SELECT clan_initials, wins FROM clans ORDER BY
wins desc")
%>
<div align="center">
<table height="55" border="0" cellpadding="0" cellspacing="0"
bordercolor="#000000" id="AutoNumber1" width="58">
<tr>
<%
i = 1
DO UNTIL teams.EOF
w1 = teams.fields.item("wins").value
t1 = trim(teams.fields.item("clan_initials").value)
IF NOT i MOD 2 = 0 THEN
%>
<td width="30">
<div align="center">
<table width="100%" border="1" cellspacing="1" bordercolorlight="#66B2F8"
bordercolordark="#175085">
<tr>
<td width="50" bgcolor="#175085" align="center"><div
align="center"><font face="Georgia" size="2" font color="#FFFFFF">
<b>1<%=t1%></b></div></td>
</tr>
<tr>
<td width="50" bgcolor="#66B2F8" align="center"><div
align="center"><font face="Georgia" size="2" font color="#000000">
<b>1<%=w1%></b></div></td>
</tr</table></div</td>
<% ELSE %>
<td width="28">
<div align="center">
<table width="100%" border="1" cellspacing="1" bordercolorlight="#66B2F8"
bordercolordark="#175085">
<tr>
<td width="50" bgcolor="#175085" align="center"><div
align="center"><font face="Georgia" size="2" font color="#FFFFFF">
<b>1<%=t1%></b></div></td>
</tr>
<tr>
<td width="50" bgcolor="#66B2F8" align="center"><div
align="center"><font face="Georgia" size="2" font color="#000000">
<b>1<%=w1%></b></div></td>
</tr</table></div</td></tr></table>
<table cellpadding="0" cellspacing="0"><tr>
<%
END IF
i = i + 1
teams.MoveNext
LOOP
%>
</table </table>
</div>
this is how that code appears now
http://scrimwars.gig-gamers.com/schedule2.asp
would have prefered it on the same table, and just show up as rows, but i
have forgotten more than i know about doing this.