Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfloop with tables

Participant ,
Mar 14, 2008 Mar 14, 2008
Hello guys. I'm trying to generate a table with results from a query. I'm using cfloop to generate this. With on result per row works ok. I'm a bit lost on how to generate the same table but showing 3 results per row instead of one. I guess I have to use nested cfloop, but how?

Any help will be highly appreciated.\

Thanks a lot.

Dani
358
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 14, 2008 Mar 14, 2008
Hi DaniFW,

This should give you three columns per row...

<cfoutput>
<table border="1">
<tr>
<cfloop query="qSelect">
<td>#qSelect.currentRow#</td>
<cfif qSelect.currentRow MOD 3 EQ 0>
</tr><tr>
</cfif>
</cfloop>
</tr>
</table>
</cfoutput>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 14, 2008 Mar 14, 2008
LATEST
Great!!!! Thanks so much Josh!!!!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources