Multiple select values using bind

I’m struggling a bit getting multiple select values using bind. When I would output using <cfoutput query""> I can catch multiple values like:

<option value="#county_id#,#county_eng#">#county_eng#</option>

output:

<cfset listItem = #listGetAt( Form.county_id, 2, ',' )# />
<cfoutput>#listItem#</cfoutput>

But to create dependent drop downs I use bind:

<cfselect name="county_id" bind="cfc:components.cfcAdmin.getCounties()" bindonload="true" value="county_id" display="county_eng" class="select" />

I use a 2 dimensional array to get the results:

    <cffunction name="getCounties" access="remote" returntype="array">
    <cfargument name="dsn" type="string" required="true" />
        <cfset var getCounties = "" />
        <cfset var result = ArrayNew(2)>
        <cfset var i=0>
        	<cfquery name="getCounties" datasource="#Application.dsn#" >
	       		SELECT county_id, county_eng
        		FROM counties
        		ORDER BY county_eng, county_gr 
        	</cfquery>
            <cfset result[1][1] = 0 >
			<cfset result[1][2]="--- Choose ---">
        <cfloop index="i" from="1" to="#getCounties.RecordCount#">
            <cfset result[i+1][1]    = getCounties.county_id[i]>
            <cfset result[i+1][2]    = getCounties.county_eng[i]>
        </cfloop>
        <cfreturn result>
    </cffunction>

I tried different possibilities like ArrayToList, making it a 3 dimensional array, etc, but without success.

Any advice would be highly appreciated.

Okay i solved it a different way. Instead of using the form elements I used the query (sub query) instead:


    UPDATE companies 
    SET county_eng =
    ( SELECT county_eng
    FROM counties
    WHERE county_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#Val( Form.county_id )#" /> )

Maybe useful for someone