Skip to main content
Inspiring
December 3, 2009
Answered

Formatting a cfoutput

  • December 3, 2009
  • 1 reply
  • 557 views

Hi,

I need have list of contacts that if there are more than 1 contacts the result should look like this:

name, phone, email; name, phone, email; name, phone, email.

The last contact ending in a " . "  rather than a ";".  I'm using a simple cfoutput to output the data.  Is there any way this could be done?

<cfoutput query = "myquery">

#name#, #phone#, #mail# ;

</cfoutput>

This topic has been closed for replies.
Correct answer ilssac

<cfoutput query = "myquery">

#name#, #phone#, #mail# <cfif myquery.currentRow NEQ myquery.recourdCount>;<cfelse>.</cfif>

</cfoutput>

1 reply

ilssac
ilssacCorrect answer
Inspiring
December 3, 2009

<cfoutput query = "myquery">

#name#, #phone#, #mail# <cfif myquery.currentRow NEQ myquery.recourdCount>;<cfelse>.</cfif>

</cfoutput>

jenn1Author
Inspiring
December 3, 2009

YOU RULE

ianskinner !