correct me if I'm wrong but won't that produce invalid HTML?

(eg. a <tr> opened but not closed)

code should read


<table>
   <tr>
   <cfset rowCounter = 0>
        <cfoutput query="qGetHandsets" group="SeriesID">
        <cfset rowCounter = rowCounter + 1>

   <td>
     <b>#SeriesName#</b><br>
     <cfoutput>#ModelName#<br></cfoutput>
   </td>
   <cfif rowCounter MOD 2 IS 0>
   </tr>
   <tr>
   </cfif>
   </cfoutput>
</tr>
</table>





-----Original Message-----
From: Jamie Strachan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 4:21 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Output display problem


Steve it worked,  thanks heaps

Jamie





Steve Onnis wrote:

> try this
> 
> 
> 
> <table>
>    <tr>
>    <cfset rowCounter = 0>
>       <cfoutput query="qGetHandsets" group="SeriesID">
>       <cfset rowCounter = rowCounter + 1>
> 
>    <td>
>      <b>#SeriesName#</b><br>
>      <cfoutput>#ModelName#<br></cfoutput>
>    </td>
>    <cfif rowCounter MOD 2 IS 0>
>    </tr>
>    <tr>
>    </cfif>
>    </cfoutput>
> </table>
> 
> 
> Cause your grouping your output, the CurrentRow value wont work for you
> cause currentRow also incrments within the inner cfoutput.  You need to set
> another var that increments only when the outer cfoutput is looping
> 
> Regards
> Steve Onnis
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Jamie
> Strachan
> Sent: Wednesday, September 03, 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/
> 
> 
> 


---
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/

---
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/

Reply via email to