Connecting Tech Pros Worldwide Forums | Help | Site Map

Outputting a matrix table

Newbie
 
Join Date: Oct 2008
Posts: 4
#1: Nov 25 '08
Alright, I feel like this is easy, but I haven't been able to figure it out:

I have two database tables which I need to gather information from and output on a coldfusion page in a table.
I know I can output the data I need in a row with:
Expand|Select|Wrap|Line Numbers
  1. <cfquery name="list" datasource="abc">
  2. select pkey, summary, stringvalue, numbervalue
  3. from abc.issue.id=abc.customfieldvalue.issue
  4. and project = 10200;
  5. </cfquery>
  6. <table>
  7. <cfoutput query = "list">
  8. <tr><td>#summary# : #list#</td></tr>
  9. </cfoutput>
  10. </table>
What I can't figure out is how to format this information into a table.

Thanks for any help!

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Nov 26 '08

re: Outputting a matrix table


Are you sure the query is correct? Have you checked the output in a database?

As for displaying in a table, first display the table headers outside the query loop and then within the cfoutput loop, put the fields in separate cells - you can't just use #list# to output all fields.
Reply


Similar ColdFusion bytes