Found the solution, with help from ACFUG
Much easier to create column in SQL statement DUH!!! ( on my part )
<cfquery name="qryJobAgent" datasource="#setting.dsn#">
select *,JobsFound = 0,JobsRespondedTo = 0 from search_job where
jobseeker_id = #client.jobseekerid#
</cfquery>
The query return is really an array! I knew that but did not try the
obvious solution which was to simply set the new column value with an
array spec.
<cfset qryJobAgent.jobsfound[RowNumber] = qrySelectJobs.RecordCount>
Orginal code below...
Bartee Lamar
www.enterpriseenergy.com
MSN [EMAIL PROTECTED]
-----Original Message-----
From: Bartee Lamar [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 12:10 PM
To: CF-Talk
Subject: QueryAddColumn / QuerySetCell ???
I am having trouble setting a cell in a query....
Code is below the line -----
Here are things I know:
1. There column does get created. I can see it in the cfdump ( I love
cfdump :-)
2. cfinclude template="qrySelectjobs.cfm" does execute I can see the
sql on debug output.
2. The value in #qrySelectJobs.RecordCount# is 62
3. The vaue in #RowNumber# is 1
The PROBLEM is the "JobsFound" does not get set !!!!!!
----------------------------------------------
<cfquery name="qryJobAgent" datasource="#setting.dsn#">
select * from search_job where jobseeker_id = #client.jobseekerid#
</cfquery>
<cfset ColumnValues = arraynew(1)>
<cfset temp = queryaddcolumn(qryJobAgent,"JobsFound",columnvalues)>
<cfset RowNumber = 0>
<cfoutput query="qryJobAgent">
<cfset RowNumber = RowNumber + 1>
<cfinclude template="qrySelectjobs.cfm"> <--- execute another query to
get JobFound count
<cf temp =
QuerySetCell(qryJobAgent,"JobsFound","#qrySelectJobs.RecordCount#",RowNu
mber)>
#qrySelectJobs.RecordCount# #RowNumber#<br> <----- prove there is
something in the count
</cfoutput>
<cfdump var="#qryjobagent#">
Bartee Lamar
www.enterpriseenergy.com <http://www.enterpriseenergy.com/>
MSN <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists