This can be found on my website in Issue 00001

I. ColdFusion Code: Output Text in 2,3,4,... Rows 
You can just modify the number 4 after the MOD 
and change the yourquery to whatever you query name 
is and of course the var to your own var. 

<table> 
        <tr> 
        <cfoutput query="yourquery"> 
                <td>#var#</td>
                <cfif yourquery.CurrentRow MOD 4 IS 0> 
                        </tr> <tr> 
                </cfif> 
        </cfoutput> 
        </tr> 
</table> 





> -----Original Message-----
> From: James Birchler [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 16, 2001 1:27 PM
> To:   CF-Talk
> Subject:      Formatting CFQUERY Results in a Table
> 
> Hi Gang -
> 
> I'm building an employee directory, and am adding a page that displays all
> employee photos so that if you don't know someone's name, you can find it
> by
> recognizing their face. My query pulls an image url and fname/lastname
> from
> a database.
> 
> I'm trying to format the output in table rows, with each row containing 4
> table cells (each with one photo displayed).
> 
> How do I let CF know when to create another table row? So far I can make
> one
> really long row, or one really long column!
> 
> Is the answer on the SQL side (using LIMIT or COUNT) or on the CF side, or
> both? Any suggestions much appreciated.
> 
> Thanks,
> 
> James
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to