Ooops...

Forgot my closing </cfif>. Change this line:
<cfoutput>#score#<cfif currentrow LT recordcount>,</cfoutput>

to this line:
<cfoutput>#score#<cfif currentrow LT recordcount>,</cfif></cfoutput>

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 09, 2005 1:48 PM
To: CF-Talk
Subject: RE: removing trailing comma in CSV row


<cfoutput query="get_result" group="spdinput_id">
#spdinput_id#,
<cfoutput>#score#<cfif currentrow LT recordcount>,</cfoutput>
<p>
</cfoutput>

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Richard Colman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 09, 2005 12:42 PM
To: CF-Talk
Subject: removing trailing comma in CSV row


I am trying to build lines of CSV data. However, I don't know exactly how to
get rid of the LAST comma in the line.



Here is the result:



42, 0,0.9,0,-0.1,0.8,0,1.2,0.1,0.1,1.5,0.3,0,1.3,0,0,0.9,0.4,0,0,0.1,0.6,
(note trailing comma)



Here is the code (ugly as it may be):



<cfquery .>

select spdinput_id, location,score from spdout

group by spdinput_id, location, score

order by spdinput_id, location

</cfquery>



 <cfloop from="1" to="#get_result.recordcount#" index="i" step="1">



 <cfoutput query="get_result" group="spdinput_id">

  #spdinput_id#,

             <cfoutput>#score#,</cfoutput>

 <p>

 </cfoutput>



 </cfloop>



Any ideas appreciated.



Rick.









~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223720
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to