Get a distinct row count on the series name, divide it by two, then use
CEILING I believe to get the rounded up number.
Set it as a variable upperCount.
Then use a loop
<table>
<cfloop from="1" to="#variables.upperCount#" index="i">
<tr>
<td>
<b>#yourQueryName.SeriesName[variables.i]#</b><br>
<cfoutput>#yourQueryName.ModelName[variables.i]#<br></cfoutput>
</td>
</tr>
<tr>
<td>
<cfif evaluate(variables.i + variables.upperCount) NEQ
yourQueryName.recordCount>
<b>#yourQueryName.SeriesName[variables.i +
variables.upperCount]#</b><br>
<cfoutput>#yourQueryName.ModelName[variables.i +
variables.upperCount]#<br></cfoutput></cfif>
</td>
</tr>
</cfloop>
</table>
Euhhh, I wrote it all int his email so not sure if something is wrong or
not, did not test it. Have written it before, but not sure if I left
anything out...
Give it a go, if it doesn;t work them I'm sure it will give some idea...
Taco
> -----Original Message-----
> From: Jamie Strachan [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, 3 September 2003 3:43 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Output display problem
>
> Hi All,
>
> I have got a simple query that groups models of telephone by the series
> they belong to. My client would like to have the output shown side by
> side in a simple 2 column display. I have tried to use a method i use
> all the time for this but i am having some troubles witht the output
>
> Current Output
> ***************************
> Series Name
> Model
> Model
> Model
> ----------------
> Series Name
> Model
> Model
> Model
> ----------------
> Series Name
> Model
> Model
> Model
>
>
>
>
> Desired Output
> ***************************
> Series Name Series Name
> Model Model
> Model Model
> Model Model
> ----------------------------------
> Series Name Series Name
> Model Model
> Model Model
> Model Model
>
>
> The code that i am using for the desired output is below but it throws
> the tables all over the place, i think it has something to do with the
> grouping.
>
>
> Current Code Used for Output
> ******************************
>
> <cfquery name="qGetHandsets" datasource="mydsource">
> select m.ModelSeriesID, m.ModelName, s.SeriesID, s.SeriesName
> from HANDSETSERIES s, HANDSETMODELS m
> where m.ModelSeriesID = s.SeriesID
> order by s.SeriesID
> </cfquery>
>
>
> <table>
> <tr>
> <cfoutput query="qGetHandsets" group="SeriesID">
> <td>
> <b>#SeriesName#</b><br>
> <cfoutput>#ModelName#<br></cfoutput>
> </td>
> <cfif qGetHandsets.CurrentRow MOD 2 IS 0>
> </tr>
> <tr>
> </cfif>
> </cfoutput>
> </table>
>
>
> Thanks for any feedback/help
>
> Jamie
>
>
>
>
>
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
-----------------------------------------------------------------------------------
The contents of this message are the views of the Author and do not necessarily
reflect the views of SUNCORP METWAY LTD ABN 66 010 831 722.
The content of this e-mail, including attachments is a confidential communication
between the Suncorp Metway Group and the intended addressee. Any unauthorised use of
the contents is expressly prohibited. If you have received this e-mail in error please
contact the sender immediately and then delete the message and any attachment(s).
http://www.suncorp.com.au
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/