Panos
asked on
Coldfusion - query to list question
Hello experts .
I need help to output two columns in a list.
I have a code that is working and i'm getting the output i need but i was thinking if i can use another function to 'build' the output (f.e. array).
My code :
<cfoutput query="data" group="#arguments.sorting# ">
<cfset ruleslist = ''/>
<cfoutput>
<cfset listitem = 'testname_' & testname_id & '=' & testname_value/>
<cfset ruleslist = listappend(ruleslist,listi tem,'&')/>
</cfoutput>
#ruleslist#</br>
</cfoutput
Any help?
I need help to output two columns in a list.
I have a code that is working and i'm getting the output i need but i was thinking if i can use another function to 'build' the output (f.e. array).
My code :
<cfoutput query="data" group="#arguments.sorting#
<cfset ruleslist = ''/>
<cfoutput>
<cfset listitem = 'testname_' & testname_id & '=' & testname_value/>
<cfset ruleslist = listappend(ruleslist,listi
</cfoutput>
#ruleslist#</br>
</cfoutput
Any help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, it's good to check the options when working on a section of code. In this case, that code is probably as good as it gets. As using db functions, does not really buy anything.
Glad I could help.
Glad I could help.
ASKER
I'm sometimes wondering if there would be a better way of doing something.