Not sure exactly what you want to do but I've made your sample code
all pretty, and got the ctr logic correct in terms of tests and
increments.

At the end of the loop you need to tidy up the last row - my code
below is incomplete in that respect.

Not the full answer but may help you out :-)

Code Not tested!

<cfset ctr=1>
<table width="90%" align="left" cellpadding="6">
   <cfoutput query="getprodsbycategory" group="prodmodelcode">
      <cfif ctr EQ 1><tr></cfif>
      <td height="90" bgcolor="##000000">
         <div align="center">
         <a href="itemdetail2.cfm?MODEL=#getprodsbycategory.prodmodelcode#">
             <img src="productimages/medium_#getprodsbycategory.imagename#" 
                  alt="Click for details" 
                  width="#variables.imgwidth#" 
                  height="#variables.imgheight#" 
                  border="0" />
          </a>
          <br />
          <a href="itemdetail.cfm?MODEL=#getprodsbycategory.prodmodelcode#">
              #getprodsbycategory.prodmodeltitle#
          </a>
          <br />
          <span style="font-family: Verdana, Arial, Helvetica,
sans-serif; font-size: 10px; color:##F7F7F7">
          $<strong>#getprodsbycategory.prodsellprice#</strong>
          </span>
          </div>
      </td>
      <cfif ctr MOD 3>
         </tr><tr>
      </cfif>
      <cfset ctr=ctr + 1>
   </cfoutput>
   <cfif ctr MOD 3>
      <td>&nbsp;</td></tr>
   </cfif>
</table>


On Mon, 21 Mar 2005 20:33:21 -0400, Will Tomlinson <[EMAIL PROTECTED]> wrote:
> I'm trying to figure out how to create my previous/next paging with this 
> cfoutput query. It's usually straightforward with a standard cfoutput that 
> uses a recordcount, but I'm using my own counter because of the grouped 
> output. Any ideas on how I'd get started?
> 
> Thanks,
> Will
> 
> <cfset ctr=0>
>          <table width="90%" align="left" cellpadding="6">
>        <tr>
>                 <cfoutput query="getprodsbycategory" group="prodmodelcode">
>                  <cfset ctr=ctr + 1>
>            <td height="90" bgcolor="##000000">
>                          <div align="center"><a 
> href="itemdetail2.cfm?MODEL=#getprodsbycategory.prodmodelcode#"><img 
> src="productimages/medium_#getprodsbycategory.imagename#" alt="Click for 
> details" width="#variables.imgwidth#" height="#variables.imgheight#" 
> border="0" /></a>
>                          <br />
>                  <a 
> href="itemdetail.cfm?MODEL=#getprodsbycategory.prodmodelcode#">#getprodsbycategory.prodmodeltitle#</a>
>                                          <br />
>                                      <span style="font-family: Verdana, 
> Arial, Helvetica, sans-serif; font-size: 10px; 
> color:##F7F7F7">$<strong>#getprodsbycategory.prodsellprice#</strong></span>
>                      </div>
>                        </td>
>  <cfif ctr MOD 3 EQ 0>
>     </tr><tr>
> </cfif>
>      </cfoutput>
>             </table>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199634
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to