This is a multi-part message in MIME format.
------=_NextPart_000_004C_01BFF87B.E5E41860
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I've been searching on info on how to create a multiple column table =
from one column of data.
What I want to be able to do is create a table like so:
Adam Chris
Bob Dan
But the code I found outputs like this:
Adam Bob
Chris Dan
How do I do this? I'm thinking that I might have to two tables. If =
this is the case, how do I go about doing that?
=20
Thanks in advance for any help.
Richard Ramos
Guy in charge of Computers and Stuff
Here's the code I have:
=20
<cfquery datasource=3D"#datasource#" Name=3D"language">
SELECT ID, language1
FROM language
</cfquery>
<!--- Specify number of columns. --->
<CFSET NumberOfColumns =3D 2>=20
<!--- Create table with multiple columns. --->
<TABLE>
<TR>
<CFOUTPUT query=3D"language">
<CFIF (CurrentRow MOD NumberOfColumns) IS 1>
</TR><TR>
</CFIF>
<td>#language1#</td>
</cfoutput>
</tr>
</table>=20
<p>
------=_NextPart_000_004C_01BFF87B.E5E41860
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>I've been searching on info on how to =
create a=20
multiple column table from one column of data.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>What I want to be able to do is create =
a table like=20
so:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Adam =
Chris</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bob =
Dan</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>But the code I found outputs like=20
this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Adam Bob</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Chris =
Dan</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>How do I do this? I'm thinking =
that=20
I might have to two tables. If this is the =
case, how do=20
I go about doing that?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance for any =
help.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Richard Ramos</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Guy in charge of Computers and =
Stuff</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Here's the code I have:</FONT></DIV>
<DIV> <FONT face=3DArial size=3D2><BR><cfquery =
datasource=3D"#datasource#"=20
Name=3D"language"><BR> SELECT ID, language1<BR> FROM=20
language<BR></cfquery></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><!--- Specify number of columns.=20
---><BR><CFSET NumberOfColumns =3D 2> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><!--- Create table with multiple =
columns.=20
---><BR><TABLE><BR><TR><BR><CFOUTPUT=20
query=3D"language"><BR><CFIF (CurrentRow MOD NumberOfColumns) IS=20
1><BR></TR><TR><BR></CFIF><BR><td>#language1#&=
lt;/td><BR></cfoutput><BR></tr><BR></table>=20
<BR><p></FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_004C_01BFF87B.E5E41860--
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.