Hi Adam,

Give this a try.

<cfset recnumber=1>
  <table id="tbl_people">
    <tbody>
      <tr>
        <th scope="col">Record Number</th>
        <th scope="col">Person</th>
        <th scope="col">Discipline</th>
        <th scope="col" width="132">Phone</th>
        <th scope="col">E-mail</th>
      </tr>
        <cfoutput query="getMember">
        <tr>
                <td>#recnumber#</td>
                <td><h3>#firstName# <cfif Trim(middleName) is
"">#lastName#<cfelse>#middleName# #lastName#</cfif></h3>
                <p>#office#</p>
                <ul>
                  <li><h4>#title#</h4></li>
                </ul>
                </td>
                <td>#discipline#</td>
                <td>#phone#</td>
                <td><a href="mailto:#netid#>#netid#</a></td>
          </tr>
        <cfset recnumber=#recnumber# +1>
        </cfoutput>
    </tbody>
  </table>


Hope that helps.
Mike



Michael Iafrate  | President
___________________________________ 
Treehouse Technology
209 Wildwood Trail 
Mississauga, ON    L4Z 3S5 
p. 416 .238 .6252 
f. 416 .238 .9568 
e. [EMAIL PROTECTED]
w. http://www.treehousetechnology.com

-----Original Message-----
From: Adam Parker [mailto:[EMAIL PROTECTED] 
Sent: October-26-07 4:58 PM
To: CF-Newbie
Subject: Loop Through Query While Counting

Hi All - 

I have a SQL table that I am querying to display members' information into a
table.  I am using:

<cfoutput query="getMember">
  <table id="tbl_people">
    <tbody>
      <tr>
        <th scope="col"></th>
        <th scope="col">Person</th>
        <th scope="col">Discipline</th>
        <th scope="col" width="132">Phone</th>
        <th scope="col">E-mail</th>
      </tr>
      <tr>
        <td></td>
        <td><h3>#firstName# <cfif Trim(middleName) is
"">#lastName#<cfelse>#middleName# #lastName#</cfif></h3>
        <p>#office#</p>
        <ul>
          <li><h4>#title#</h4></li>
        </ul>
        </td>
        <td>#discipline#</td>
        <td>#phone#</td>
        <td><a href="mailto:#netid#>#netid#</a></td>
      </tr>
    </tbody>
  </table>
</cfoutput>

This outputs the data, but the column headings are repeated instead of only
displaying once at the top of the columns.  I also want to count off the
results as they are displayed.  I'm not quite sure where to go with this.
Can anyone offer help?

Thank you,
Adam 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3125
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to