Use order by in your query to make sure the results come out as you have
below.  Then use the "group" attribute in cfoutput, using the column name
with the repeating values.  Now that you've used the "group" attribute you
can nest an additional cfoutput tag, which will cause any other columns
associated with the repeating column to loop so that you could have an
output like:

John
        13
        15
Smith
        20
        34
        56
Bob
        3
        45
        10

And that code would be;

<cfquery name="myquery" datasource="dsn">
        Select repeatingcolumn, othercolumn
        From table
        Order by repeatingcolumn
</cfquery>      

<cfoutput query="myquery " group="col1">
        #repeatingcolumn#
        <cfoutput>
                #othercolumn#
        </cfoutput>
</cfoutput>



|-----Original Message-----
|From: summy h [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, April 03, 2001 10:18 PM
|To: CF-Talk
|Subject: some same value into one
|
|
|Hi,
|
|I got some value from the cfquery like
|
|(John, John, Smith, Smith, Smith, Bob, Bob)
|
|Now I want to display these value on the web page like
|
|(John, Smith, Bob)
|
|I'm stuck, how do you program and make it possible in 
|coldfusion?
|
|TIA
|
|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

Reply via email to