Professional Web Applications Themes

Data placement - Macromedia ColdFusion

What I'm wanting to do is display my query results in 3 columns and then move down to the next row to display another 3 and so on... I think it's got to be something easy... I'm missing it though.....

  1. #1

    Default Data placement

    What I'm wanting to do is display my query results in 3 columns and then move down to the next row to display another 3 and so on... I think it's got to be something easy... I'm missing it though..
    ThomasHuber Guest

  2. #2

    Default Re: Data placement

    like this
    <table>
    <tr>
    3 <th> tags for your column headers
    </tr>
    <cfoutput query = "yourquery">
    <tr>
    <td>#field1#</td> then two more of these
    </tr>
    </cfoutput>
    </table>
    Dan Guest

  3. #3

    Default Re: Data placement

    :confused;

    I was thinking more like this... The way you showed me it would put all the
    information in each of the three columns.. The problem with what I have is it
    does not get the last record... If I do not put an endrow", it work but it will
    run the query 3 times and put blank spot in the <td></td>, so I get 7 records
    and 14 blank spots...

    <cfset i = 1>
    <cfloop query="FAVORITES" startrow="#i#" endrow="#i+1#">
    <cfoutput>
    <tr>
    <td><img src="images/artists/#FAVORITESPHOTO#" width="65"></td>
    <td><font
    color="CC6600"><b>#FAVORITESARTIST#</b></font><br>#FAVORITESLOCATION#</td>
    <td><img src="images/artists/#FAVORITESPHOTO[i+1]#" width="65"></td>
    <td><font
    color="CC6600"><b>#FAVORITESARTIST[i+1]#</b></font><br>#FAVORITESLOCATION[i+1]#<
    /td>
    <td><img src="images/artists/#FAVORITESPHOTO[i+2]#" width="65"></td>
    <td><font
    color="CC6600"><b>#FAVORITESARTIST[i+2]#</b></font><br>#FAVORITESLOCATION[i+2]#<
    /td>
    <cfset i = i+3>
    </cfoutput>
    </cfloop>

    Somebody please help.... Thomas

    ThomasHuber Guest

  4. #4

    Default Re: Data placement

    Is this what you are talking about ...?



    <table border="1">
    <tr>
    <cfoutput query="yourQuery">
    <td>#someColumn#</td>
    <cfif currentRow MOD 3 eq 0>
    </tr><tr>
    </cfif>
    </cfoutput>
    </tr>
    </table>

    mxstu Guest

Similar Threads

  1. my.cnf placement
    By Ted in forum MySQL
    Replies: 0
    Last Post: July 18th, 08:42 PM
  2. Forum placement
    By matthobson1 in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: October 11th, 01:21 AM
  3. stage placement
    By keatin in forum Macromedia Director Basics
    Replies: 2
    Last Post: September 6th, 06:47 PM
  4. Placement
    By Tim Midgett in forum ASP Database
    Replies: 2
    Last Post: July 14th, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139