Yes the query returns multiple rows.

Thanks - but Jim Wright has given me a great solution.

Seamus
================ You wrote ================
Are we to assume correct that this query returns multiple rows in  
query
>analyzer?
>
>----- Original Message ----- 
>From: "Seamus Campbell" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[email protected]>
>Sent: Friday, October 06, 2006 2:36 AM
>Subject: multiple selects problem
>
>
>> Hi
>>
>> I've got a field called category - which can have multiple
>> parent_categories.
>> I want to display all the parent_categories a category has in  
a
>> drop down box in a form.
>> I can only get it to show ONE parent_category.
>> Below is my current code - can anyone give a clue as to how to  
show
>> multiple parent_categories, please
>> +++++++++++++++++++++++++++++++++++++++++++++++
>> <CFQUERY NAME="get_parent_categories"
>> DATASOURCE="#request.DSN_main#">
>> SELECT tbl_parent_category.parent_category_id,
>> tbl_parent_category.parent_category
>> FROM tbl_parent_category;
>> </CFQUERY>
>> <cfset form_size = get_parent_categories.RECORDCOUNT>
>> <CFQUERY NAME="get_this_parent_categories"
>> DATASOURCE="#request.DSN_main#">
>> SELECT tbl_parent_category.parent_category_id,
>> tbl_parent_category.parent_category,
>> tbl_category_parent_category.category_id
>> FROM tbl_parent_category INNER JOIN tbl_category_parent_category  
ON
>> tbl_parent_category.parent_category_id =
>> tbl_category_parent_category.parent_category_id
>> WHERE category_id = #URL.category_id#;
>> </CFQUERY>
>>
>> <form action="edit_category_display_names.cfm" method="post">
>> <input type="hidden" name="category_id"
>> value="<cfoutput>#URL.category_id#</cfoutput>">
>> <input type="hidden" name="stage" value="write">
>> <select name="parent_category_id"
>> size="<cfoutput>#form_size#</cfoutput>" multiple>
>> <cfoutput query="get_parent_categories">
>> <option value="#parent_category_id#"<CFIF
>> get_parent_categories.parent_category_id IS
>>  
get_this_parent_categories.parent_category_id>SELECTED</CFIF>>#get  

>> parent_categories.parent_category#</option>
>> </cfoutput>
>> </select>
>> <input type="submit" name="submit2" value="change">
>> </form>
>> +++++++++++++++++++++++++++++++++++++++++++++++
>>
>>
>> Seamus Campbell   Boldacious WebDesign
>> http://www.boldacious.com   ~~~~   [EMAIL PROTECTED]
>> ph  0410 609 267
>>
>>
>>
>> 
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255862
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to