Well of course, you overwrite the query every time you iterate to the 
next value. The query always has the same name, so CFMX overwrites it. 
Nevertheless it is a bad solution. You should do something like this:
<cfquery name="getCateories"...>   
select * from categories where category in ('#mcategories#')
</cfquery>

You could of course have your form, where the user selects the 
categories store the categoryID's and then do an in over these categoryID's

Greetings from Switzerland
Gert Franz
Railo Technologies GmbH
[EMAIL PROTECTED]
www.railo.ch

Join our Mailing List
german:    http://de.groups.yahoo.com/group/railo/
english:   http://groups.yahoo.com/group/railo_talk/
linked in: http://www.linkedin.com/e/gis/71368/0CF7D323BBC1



John Seelye schrieb:
> Thanks for the reply.
>
> ROL.getcategorydetailnames()
>
> Is actually a PostGRESQL function that is called within the <cfquery ...>
>
> The function only accepts one input (an integer) per iteration, so in my form 
> that calls this page when someone selects more than one category I need the 
> entire query to execute (and give output) for each category id ... 
> (#mcategories#).
>
> The way I have it written it only gives the output for the last category id 
> passed to it.
>
> The output I am looking for would look something like ...
>
> Category 1 - thing 1, thing 2, thing 3, thing 4
> Category 2 - thing 11, thing 12, thing 13, thing 14
> Category 3 - thing 20, thing 21 
> and so on ...
>
> I need to get the categories from user input and the "things" from the 
> database with that function.
>
> The function works like a charm with just 1 category passed to it.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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

Reply via email to