Hello All...
I am trying to sort a multi-dimentional array. And am getting an error I've
never seen before.
==== The Setup ====
I am querying two tables to populate a select box,Because I need to know
which table the selection came from, and there will be duplicate IDs on two
tables, I want to add a table identifier...So I thought I would make an
array...(if you know a better way please share).
I have reversed the order in which the array populates - because as far as I
can tell - the ArraySort() will only do the first 'field', and I need to
sort the text 'field' in alphabetical...not the IDs...(if you know a better
way please share).
Oh yea - one more piece of info - the text is stored in unicode on the db.
===============
==== The Code ====
<cfset sql_getContent = ArrayNew(2)>
<cfloop query="GetSubject">
<cfset sql_getContent[currentrow][3] = 1>
<cfset sql_getContent[currentrow][2] = GetSubject.Subject_ID>
<cfset sql_getContent[currentrow][1] = GetSubject.Subject_Name>
</cfloop>
<cfloop query="GetSSubject">
<cfset SSnum = GetSubject.recordCount+GetSSubject.CurrentRow>
<cfset sql_getContent[SSnum][3] = 3>
<cfset sql_getContent[SSnum][2] = GetSSubject.SSubject_CD>
<cfset sql_getContent[SSnum][1] = GetSSubject.SSubject_Name>
</cfloop>
<cfset ArraySort(sql_getContent, "textnocase")>
=================
==== The Error ====
The expression has requested a variable or an intermediate expression result
as a simple value, however, the result cannot be converted to a simple
value. Simple values are strings, numbers, boolean values, and date/time
values. Queries, arrays, and COM objects are examples of complex values.
The most likely cause of the error is that you are trying to use a complex
value as a simple one. For example, you may be trying to use a query
variable in a <CFIF> tag. This was possible under Cold Fusion 2.0 but is an
error under later versions.
===================
Thanks!
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]