Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Explorer5 #1
Multiple columns w/ grouped output
I'm familiar with how to dynamically create more than one column in an query,
but until now, ive never done it in conjunction with a grouped output.
I'm trying to display article headings, and then beneath those headings their
articles.
Here's the code i'm using.
<cfquery name="GetArticles" datasource="Weddingsetgo">
select *
from articletypes,articles
where articletypes.articletypeid=articles.articletypeid
order by articletype asc
</cfquery>
<CFSET NumberOfColumns = 2>
<table width=100% valign=top height=100%>
<tr>
<cfoutput query="GetArticles" group="Articletype">
<CFIF (CurrentRow MOD NumberOfColumns) IS 1>
</TR><TR valign=bottom>
</CFIF>
<td>
<b>#articleheading#</b>
<cfoutput group="headline">
<li class="text">#headline#</li>
</cfoutput>
</td>
</cfoutput>
</tr>
</table>
For some odd reason, two columns only appear twice, and then in one row -
there are three columns.. Anyone have any idea?
Thanks,
Explorer5 Guest
-
STD of multiple columns
Dear Mysql-ians, I want to calculate the standard deviation of data that are in multiple columns. I know how to calculate the STD of 1 column... -
Left join, grouped output question
Hey All, I have a SQL JOIN / Output question. So for this simple CMS I have built I two tables I am joinging. An "issues" table (as in magazine... -
Datagrid in multiple columns
It is possible to arrange the datagrid it self into multiple columns? For example I have a grid with two items - id and name. I have over 600... -
Generating table rows and columns in output?
When I output the query results, I would like to display them in a 4 column table. While I can have it add a column as cell as in... -
help w/ multiple columns in NSTableView
Hey All, I'm trying to load a file with columns of data separated by white space and display it in an NSTableView. The file loads fine, but each... -
JJBBDD #2
Re: Multiple columns w/ grouped output
try adding the 'group by' to the query itself, in the sql. my hunch is the recordset pointer for the CurrentRow variable gets thrown out of whack by the 'group by' parameter in the query output.
JJBBDD Guest



Reply With Quote

