Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
brokerandy25 #1
Cfoutput help!!!
I am trying to figure out how to output records from a query that is returing 2
distinct table rows from each query. THe out put needs to look like this
1 2
1.a 2.a
3 4
3.a 4.a
and so on. any ideas? I feel like all I am doing is just hacking at it. 1,
2, 3, 4 are one table column, and 1.a, 2.a, 3,a, 4.a are a different column but
same record. Make sense?
brokerandy25 Guest
-
No row output if no cfoutput
I've been trying to build a table in the following format: <tr><td>HTML</td> <CFOUTPUT... -
cfoutput and css
I declare an entire document within a <cfoutput> </cfoutput> section. I am trying to insert the following css style descriptor into the code: ... -
cfoutput prblem
Hi: I made a registration page with coldfusion, then I want the user to edit it's info. So I started the page with a cfquesry and then a cfoutput ... -
cfoutput and cfloop
Hi all, well this is my question: I want to show 2 or more different sets of record sets but one or more of them have to be nested on the first,... -
<cfoutput>
Hi. I'm trying to rename a file but I get an error message. My code looks someting like this: <cfset source='C:\MyDocs\old.doc'> <cfset... -
Fernis #2
Re: Cfoutput help!!!
There might be more elegant solutions than this, for sure, but here's something
to get you started.
<cfquery name="myQuery" datasource="mydatasource">
SELECT column1,column2 FROM mytable
</cfquery>
<cfoutput>
<cfloop query="myQuery">
<cfif currentrow MOD 2 EQ 1>
<!--- 1st, 3rd, 5th, 7th, etc. line of query --->
<cfset temp1 = column1><cfset temp2 = column2>
<cfelse>
<!--- 2nd, 4th, 6th, 8th, etc. line of query --->
#temp1# #column1#<br>
#temp2# #column2#<br>
<!---<cfset temp1 = ""><cfset temp2 = "">--->
</cfif>
</cfloop>
</cfoutput>
This example assumes there is an even number (2, 4, 6, 8...) rows returned. If
you're expecing an odd number of records returned, uncomment the line I've
commented, so that you can after the loop check if temp1 and temp2 were
assigned something else than blank/empty, and flush #column1# and #column2#
values on the screen. Or you can place some extra conditions inside the loop,
checking if we're on the last line of the query, and the recordcount is an odd
number (1, 3, 5, 7...), so it'll not buffer the values, but output them instead.
Fernis Guest
-
brokerandy25 #3
Re: Cfoutput help!!!
I really appreaciate the help, but my problem is that I won't know how many
records, for we are outputting a list of pictures for an "oniline photo album".
people can already upload photos to the site. Any other Ideas, i Do really
appreciate the help
ANdrew WInn
[url]http://www.indianaevenings.com[/url]
brokerandy25 Guest



Reply With Quote

