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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Adam&nbsp;&nbsp;&nbsp; =
Chris</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

Dan</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But the code I found outputs like=20
this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Adam&nbsp;&nbsp;&nbsp; Bob</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Chris&nbsp;&nbsp;&nbsp; =
Dan</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How do I do this?&nbsp; I'm thinking =
that=20
I&nbsp;might have to&nbsp;two tables.&nbsp; If this is the =
case,&nbsp;how do=20
I&nbsp;go about doing that?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance for any =
help.</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here's the code I have:</FONT></DIV>
<DIV>&nbsp;<FONT face=3DArial size=3D2><BR>&lt;cfquery =
datasource=3D"#datasource#"=20
Name=3D"language"&gt;<BR>&nbsp;SELECT ID, language1<BR>&nbsp;FROM=20
language<BR>&lt;/cfquery&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;!--- Specify number of columns.=20
---&gt;<BR>&lt;CFSET NumberOfColumns =3D 2&gt; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;!--- Create table with multiple =
columns.=20
---&gt;<BR>&lt;TABLE&gt;<BR>&lt;TR&gt;<BR>&lt;CFOUTPUT=20
query=3D"language"&gt;<BR>&lt;CFIF (CurrentRow MOD NumberOfColumns) IS=20
1&gt;<BR>&lt;/TR&gt;&lt;TR&gt;<BR>&lt;/CFIF&gt;<BR>&lt;td&gt;#language1#&=
lt;/td&gt;<BR>&lt;/cfoutput&gt;<BR>&lt;/tr&gt;<BR>&lt;/table&gt;=20
<BR>&lt;p&gt;</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.

Reply via email to