I have to agree with Gert on this one. That function needs to be rewritten so that it can accept a list of values. Would be interesting to see what the function is doing too.
Running multiple queries in that way is unnecessarily network heavy. Gary Gilbert http://www.garyrgilbert.com/blog On Thu, Sep 18, 2008 at 6:03 PM, Gert Franz <[EMAIL PROTECTED]> wrote: > 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;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313046 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

