Re: Repeating Data - Unsure of my use of cfquery
On 3/16/2010 8:22 AM, Steven Sprouse wrote: > If so, what is the currentRow value? Just a little confused there. currentRow is one of the values provided by ColdFusion about its query objects, just like columnList and recordCount. It is simple the current row of the record set that is being processed in the current iteration of a query loop, either or loops. You can use it any time you want to know what iteration you are on. I.E a way to alternate row colors: #darkBackground# You can normally ignore the need to keep track of the current row when you are looping over a single record set inside of a loop. But once you nest two or more separate query loops inside each other, ColdFusion can no longer know for certain which iteration of which record set do you want to out put at a given point. It falls on you to explicitly tell ColdFusion which iteration to use. I.E. the aQuery.currentRow. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331791 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
Just so I'm clear, are you saying that I need to change my #aQuery.aColumn[aQuery.currentRow]# formatting within the form? For example, I need to change this: #getSchools.SchoolBrief# to this: #getSchools.SchoolBrief[getSchools.currentRow]# If so, what is the currentRow value? Just a little confused there. ___ > > > > > > >That is illegal because ColdFusion does some automatic variable scoping >that would just not work in such a situation. To do this you have to >use the form. > >I.E. > > > > > > > > >Just realize with this from CF is not going to automatically scope the >query column names for you and you will have to keep track of the rows. >You output will look something like this. > >#aQuery.aColumn[aQuery.currentRow]# and #bQuery.bColumn[bQuery.currentRow]# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331788 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
That is illegal because ColdFusion does some automatic variable scoping that would just not work in such a situation. To do this you have to use the form. I.E. Just realize with this from CF is not going to automatically scope the query column names for you and you will have to keep track of the rows. You output will look something like this. #aQuery.aColumn[aQuery.currentRow]# and #bQuery.bColumn[bQuery.currentRow]# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331786 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Repeating Data - Unsure of my use of cfquery
You can put a inside of a tag. -Original Message- From: Steven Sprouse [mailto:sspro...@ccboe.com] Sent: Tuesday, March 16, 2010 10:39 AM To: cf-talk Subject: Re: Repeating Data - Unsure of my use of cfquery I got my original form to output the way I wanted it to. Now, I'm trying to actually process and validate that form and I'm running into more errors. I sort of know what I'm doing wrong, but unclear how to fix it. Here is my error: Invalid tag nesting configuration. A query driven CFOUTPUT tag is nested inside a CFOUTPUT tag that also has a QUERY= attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing. The error occurred on line 299. Is there an easy way for me to send the file of my processing document on this forum? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331785 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
I got my original form to output the way I wanted it to. Now, I'm trying to actually process and validate that form and I'm running into more errors. I sort of know what I'm doing wrong, but unclear how to fix it. Here is my error: Invalid tag nesting configuration. A query driven CFOUTPUT tag is nested inside a CFOUTPUT tag that also has a QUERY= attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing. The error occurred on line 299. Is there an easy way for me to send the file of my processing document on this forum? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331784 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
You guys are awesome. Sometimes it's the easiest things... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331753 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
Just separate each table into its own query. Use the data from the right table in the right place and the problem is solved. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 15 March 2010 22:39, Steven Sprouse wrote: > > Barney, would that require that the different tables have a linking > relationship? I think that's my problem. There is no common field shared > among these tables. > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331752 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
Barney, would that require that the different tables have a linking relationship? I think that's my problem. There is no common field shared among these tables. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331751 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
Looking at the way the data are used, the OP probably needs five queries. The queries are just building options in select inputs. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 15 March 2010 22:36, Barney Boisvert wrote: > > Your second query is the problem, both the repeating data and the > slowness. You have a full outer join of five tables, which is not > what you want. You need inner joins. Here is a simple reference that > might help you on your way: > > http://www.sql-tutorial.net/SQL-JOIN.asp > > Has a million reference to other pages that might help. > > If you get that query sorted you should be all set. > > cheers, > barneyb > > On Mon, Mar 15, 2010 at 6:21 AM, Steven Sprouse > wrote: > > > > My Code: (link to live page - > http://www2.ccboe.com/summeracademy/app/emp/index.cfm) > > > > > > > > SELECT SchNum, SchoolBrief > > FROM SCHOOLS > > ORDER BY SchoolBrief > > > > > > > > > > > > SELECT ApplySubject, ApplySchool, School, ApplyPosition, YrsPartic, > TshirtSize > > FROM ApplySchoolList, SRAStaff, ApplySubjectGrList, YrsParticList, > TshirtSizeList > > ORDER BY School > > > > > > > > action="/summeracademy/app/app_process.cfm"> > > > > > > > > > > > >Contact and Payroll > Information: > > > > > > > > > > > >Applicant Name: > >First: > >Last: > >MI: > > > > > > > > > > > >Employee ID: > > maxlength="6"> > > > > > > > > > > > >Current Regular School: > > size="1"> > > > Select your school > > > > > > value="#getSchools.SchoolBrief#">#getSchools.SchoolBrief# /> > > > > > > > > > > > > > > > >Current Grade and/or Subject that you > teach: > > type="text"> > > > > > > > > > > > >Phone Numbers: > >Home: type="text"> > >Cell: type="text"> > > > > > > > > > > > > > >Work: type="text"> > >IP Phone ext.: name="Voicemail" type="text"> > > > > > > > > > > > >Address: > >Street: type="text"> > > > City: State: type="text"> Zip: > > > > > > > > > > > >Email: > > type="text"> > >Please type this carefully so that we can > reach you. There are no spaces in an email address. > > > > > > > > > > > >Application > Information for Summer Academy 2010: > > > > > > > > > > > >What position are you applying > for: > > size="1"> > > > Select a position > > > > > > value="#getSrastaff.ApplyPosition#">#getSrastaff.ApplyPosition# > > > > > > > > > > > > > > > >What school would you prefer? > > size="1"> > > > Select a school > > > > > > value="#getSrastaff.School#">#getSrastaff.School# > > > > > > > > > > > > > > > >If you do not get your preferred > school, mark where you are willing to work: > > query="getSrastaff"> value="#getSrastaff.School#" /> #getSrastaff.School# > > > > > > > > > > > >What subject do you prefer to > teach? > > name="SubjectGradePreferred" size="1"> > > > Select a subject > > > > > > value="#getSrastaff.ApplySubject#">#getSrastaff.ApplySubject# > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
Your second query is the problem, both the repeating data and the slowness. You have a full outer join of five tables, which is not what you want. You need inner joins. Here is a simple reference that might help you on your way: http://www.sql-tutorial.net/SQL-JOIN.asp Has a million reference to other pages that might help. If you get that query sorted you should be all set. cheers, barneyb On Mon, Mar 15, 2010 at 6:21 AM, Steven Sprouse wrote: > > My Code: (link to live page - > http://www2.ccboe.com/summeracademy/app/emp/index.cfm) > > > > SELECT SchNum, SchoolBrief > FROM SCHOOLS > ORDER BY SchoolBrief > > > > > > SELECT ApplySubject, ApplySchool, School, ApplyPosition, YrsPartic, TshirtSize > FROM ApplySchoolList, SRAStaff, ApplySubjectGrList, YrsParticList, > TshirtSizeList > ORDER BY School > > > > > > > > > > Contact and Payroll > Information: > > > > > > Applicant Name: > First: > Last: > MI: > > > > > > Employee ID: > maxlength="6"> > > > > > > Current Regular School: > > > Select your school > > > > #getSchools.SchoolBrief# /> > > > > > > > > Current Grade and/or Subject that you > teach: > type="text"> > > > > > > Phone Numbers: > Home: > Cell: type="text"> > > > > > > > Work: > IP Phone ext.: name="Voicemail" type="text"> > > > > > > Address: > Street: type="text"> > > City: State: type="text"> Zip: > > > > > > Email: > > Please type this carefully so that we can > reach you. There are no spaces in an email address. > > > > > > Application Information > for Summer Academy 2010: > > > > > > What position are you applying > for: > size="1"> > > Select a position > > > > value="#getSrastaff.ApplyPosition#">#getSrastaff.ApplyPosition# > > > > > > > > What school would you prefer? > size="1"> > > Select a school > > > > value="#getSrastaff.School#">#getSrastaff.School# > > > > > > > > If you do not get your preferred school, > mark where you are willing to work: > name="SchoolApplyOther" type="checkbox" value="#getSrastaff.School#" /> > #getSrastaff.School# > > > > > > What subject do you prefer to > teach? > size="1"> > > Select a subject > > > > value="#getSrastaff.ApplySubject#">#getSrastaff.ApplySubject# > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331747 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Repeating Data - Unsure of my use of cfquery
My Code: (link to live page - http://www2.ccboe.com/summeracademy/app/emp/index.cfm) SELECT SchNum, SchoolBrief FROM SCHOOLS ORDER BY SchoolBrief SELECT ApplySubject, ApplySchool, School, ApplyPosition, YrsPartic, TshirtSize FROM ApplySchoolList, SRAStaff, ApplySubjectGrList, YrsParticList, TshirtSizeList ORDER BY School Contact and Payroll Information: Applicant Name: First: Last: MI: Employee ID: Current Regular School: Select your school #getSchools.SchoolBrief# Current Grade and/or Subject that you teach: Phone Numbers: Home: Cell: Work: IP Phone ext.: Address: Street: City: State: Zip: Email: Please type this carefully so that we can reach you. There are no spaces in an email address. Application Information for Summer Academy 2010: What position are you applying for: Select a position #getSrastaff.ApplyPosition# What school would you prefer? Select a school #getSrastaff.School# If you do not get your preferred school, mark where you are willing to work: #getSrastaff.School# What subject do you prefer to teach? Select a subject #getSrastaff.ApplySubject# What other subject(s) would you be willing to teach? #getSrastaff.ApplySubject# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331746 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm