OK..I have a new issue with the HTML. My designer just changed the layout on
me and I'm having a hard time with the logic for the html.
Here is my code:
<cfquery name="getFoo" datasource="employees">
select * from employees where fname like 'chris%' order by fname, lname
</cfquery>
<cfloop query="getFoo">
<table border="1">
<tr>
<cfif currentrow LTE recordcount>
<cfif (currentrow mod 2 EQ 0) or (currentrow EQ recordcount)>
<td>#getFoo.fname# #getFoo.lname#</td>
<cfelse>
<td>#getFoo.fname# #getFoo.lname#</td>
<td>#getFoo.fname[currentrow+1]# #getFoo.lname[currentrow+1]#</td>
</cfif>
</cfif>
</tr>
</table>
</cfloop>
The difference now is that there's one table per record in the query. the
table has either 1 or 2 columns based on the # of results.
see it in action here: http://www.christopherchin.com/cflooptest2.cfm
any help with the logic is much appreciated :O)
thanx!
Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7.
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278518
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4