How would I access a query inside an array for the purposes of looping over
that query?
eg..
cfloop from=1 to=#ArrayLen(arr_historyItems)# index=i
table width=95% border=1 cellpadding=4 cellspacing=0
bgcolor=#ECE9D8
tr valign=TOP
cfoutput and cfloop both have trouble looping over queries in
complex data structures such as arrays. The soluction, reference the
array by a simple variable.
cfset loopQuery = arr_historyItems[i]
cfloop query=loopQuery
Ian Skinner
Protoculture wrote:
How would I access a query inside
I get a Complex object types cannot be converted to simple values. Error.
cfset daQuery = #arr_historyItems[i]#
cfloop query=#daQuery#
~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start
sorry, nevermind... got it. Thanks for your response.
~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message:
I know that I should know this. but it escapes me at the moment.
I need to access my 2nd array element ( which is a query object ).
[1][1] = Some String
[1][2] = Query Object
How do I properly reference it for looping purposes?
cfset myTempQuery = array[1][2]!--- creates a reference ---
cfloop query=myTempQuery...
Pascal
-Original Message-
From: Daniel Farmer [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 15:35
To: CF-Talk
Subject: Accessing a query in an array
I know that I should know
from=1 to=#ArrayLen(test[i])# index=ii
#Test[i][ii]#br
/cfloop
/cfloop
/cfoutput
-Original Message-
From: Daniel Farmer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 9:35 AM
To: CF-Talk
Subject: Accessing a query in an array
I
You can not use cfoutput to output complex data structures (in this case
a query)
Pascal
-Original Message-
From: Ewok [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 15:52
To: CF-Talk
Subject: RE: Accessing a query in an array
Wouldn't it just be ArrayName[1][2]?
cfset test
-Talk
Subject: RE: Accessing a query in an array
You can not use cfoutput to output complex data structures (in this case
a query)
Pascal
-Original Message-
From: Ewok [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 15:52
To: CF-Talk
Subject: RE: Accessing a query in an array
Wouldn't
3:21 AM
Subject: Re: accessing a query as an array
I am trying to populate an array from a query and I am running into =
problems...
From what I have infered from the CF docs, CFQuery's are actually =
arrays.=20
If we assume that then, #QueryName[1][4]# should return the data in
This is a multi-part message in MIME format.
--=_NextPart_000_03C2_01C02F3E.4206BEB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am trying to populate an array from a query and I am running into =
problems...
From what I have infered
dont know why my query got all garbled but I hope this looks better
cfif application.queryStatus IS 1
cfquery datasource="#productdsn#" name="PriceBreaksQuery" dbtype="ODBC"
SELECT *
FROM Pricing
/cfquery
cfset pricebreaks = ArrayNew(2)
cfloop query="PriceBreaksQuery"
cfquery
I am trying to populate an array from a query and I am running into =
problems...
From what I have infered from the CF docs, CFQuery's are actually =
arrays.=20
If we assume that then, #QueryName[1][4]# should return the data in the =
first row and the fourth column..right??
My
: Friday, October 06, 2000 3:21 AM
Subject: Re: accessing a query as an array
I am trying to populate an array from a query and I am running into =
problems...
From what I have infered from the CF docs, CFQuery's are actually =
arrays.=20
If we assume that then, #QueryName[1][4]# sh
14 matches
Mail list logo