Bruce,
I just ran this against a local table and it renders 2 nice
columns. The "y" helps you see what currentrow MOD 2 is doing.
<cfquery name="x" datasource="cftest">
  SELECT TOP 10 *
  FROM company
</cfquery>
<table width="90%" border="1">
  <tr>
  <cfoutput query="x">
    <cfset y = CurrentRow Mod 2>
    <td>#email# - #y#</td>
    <cfif CurrentRow Mod 2 LT 1>
       </tr>
       <tr>
       </tr>
    </cfif>
  </cfoutput>
</table>

[EMAIL PROTECTED] - 1 [EMAIL PROTECTED] - 0

[EMAIL PROTECTED] - 1 [EMAIL PROTECTED] - 0

[EMAIL PROTECTED] - 1 [EMAIL PROTECTED] - 0

[EMAIL PROTECTED] - 1 [EMAIL PROTECTED] - 0

[EMAIL PROTECTED] - 1 [EMAIL PROTECTED] - 0






-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 10:00 PM
To: CF-Talk
Subject: CFOUTPUT Question

I have this piece of code:



<tr>

<cfoutput query="qSubCat1" group="Style">

                        <td>

                            <img src=""> border="0">

                        </td>

                              <cfif  CurrentRow Mod 2 IS 1>

                               </tr>

                               <tr>

                               </tr>

                      </cfif>

            </cfoutput>

                                    



What I was hoping to achieve was, when the second image appeared (the
second column), then a new row would appear. So I guess what I am saying
is that I want to create a table that is two colums wide by X rows.



Thanks,

                                                            



Bruce Sorge
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to