James,

The answer is in the output loop. Use MOD to get the remainder of CurrentRow
divided by 4, every time the result is 0 you have finished the 4th record,
so end the table row and start a new one.

--- Ben


-----Original Message-----
From: James Birchler [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 2: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