[thelist] Cold Fusion Column Formatting

Robin Hastings robin at rhastings.net
Tue Jul 10 15:24:12 CDT 2001


>keep in mind that you can access CF queries like arrays.  IOW, if you called
>the query, "get_references", then you could say
>get_references["ref_name"][3] to get the reference name from the third row.
>So, using that knowledge, you could access the entire query as necessary to
>print the columns in the order you want instead of using the <cfoutput> tag.

>Does this help?

>-joshua
and

>hi robin
>
>you mean by column rather than by row   ;o)
>
>in other words, down the first column, up to the top of the next column,
>down that column, and so on
>
>the basic strategy is to run your query, do a cfoutput loop on the query
>results, dropping each url/title pair into a 2-dimensional array, then do a
>cfloop through the array, outputting three cells at a time from the array
>into each row as you go down the table
>
>there's a bit of math that's required so that if you don't start with an
>exact multiple of three, you don't try to fill in table cells at the end of
>the table with array entries that aren't there
>
>i have working cf code which does exactly what you want, i'll send it to
>you offlist if you want it
>
>
>rudy

Thanks for the suggestions guys - an array would do the trick nicely!! I would
take that code, please, at least so that I can have something to refer to when I
screw up (as I inevitably will...). I can't even keep the column and row thing
straight, and I'm expected to do math as well?? AGGGHHH! Thanks for the hints
guys - I'll start trying to figger something out and look forward to seeing
rudy's code!

BTW, is UrlEncode/Decode necessary with CF 4.5? I thought it was, but it appears
to encode/decode all on it's own, so I left it out of this app. Perhaps the
encoding is happening just with my version of IE 5.5? If it isn't working for
others, I'll get on adding the functions pronto!


Robin Hastings
Public Computer Center Coordinator
hastingsr at mrrl.org
(573) 634-6064 x242







More information about the thelist mailing list