Try this -
<cfquery name="thingy">
SELECT * FROM Table ORDER BY courseID, name
</cfquery>
<table>
<tr><td>courseID</td>
<td>participant</td>
</tr>
<cfoutput query="thingy" group="courseID">
<tr>
<td valign="top">#courseID#</td>
<td valign="top">
<cfset NameList = "">
<cfoutput>
<Cfset NameList = ListAppend( NameList,
"#name#" )>
</cfoutput>
#NameList#
</td>
</tr>
</cfoutput>
</table>
That should do it
HTH
Alistair Davidson
Senior Web Developer
Rocom New Media
www.rocomx.net
-----Original Message-----
From: Michel Vuijlsteke [mailto:[EMAIL PROTECTED]]
Sent: 08 March 2001 08:32
To: CF-Talk
Subject: RE: make it simple to show the table.
<cfquery name="thingy">
SELECT * FROM table ORDER BY courseID, name
</cfquery>
<table>
<tr><td>courseID</td>
<td>participant</td>
</tr>
<cfoutput query="thingy" group="courseID">
<tr><td valign="top">#courseID#</td>
<td valign="top"><cfoutput>#name#<br></cfoutput></td>
</tr>
</cfoutput>
</table>
gives you almost the right output
> -----Original Message-----
> From: summy h at yahoo.com [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 08, 2001 9:16 AM
> To: CF-Talk
> Subject: make it simple to show the table.
>
>
>
> Hi,
>
> I got the result by cfquery as below.
>
> ---
> CourseID Name
> 1 John
> 1 Paul
> 2 George
> 3 Jason
> 3 Ringo
>
> I want to format these records for a web page like
> ---
> CourseID Participant
> 1 John, Paul
> 2 George
> 3 Jason, Ringo
>
> I'm stuck. How do I program to format in coldfusion?
>
> Thanks.
>
> Hosaka
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists