Re: Multiple queries from a CFC? Drop in Array?

2008-07-16 Thread Joe Rinehart
Why? It will almost certainly be a much better solution than anything else you're considering. Dave - Not sure it's better than 'anything else.' Why stick with a query that'd need constant grouping when what he's got in the DB is a set representing a hierarchical data structure? Instead

RE: Multiple queries from a CFC? Drop in Array?

2008-07-16 Thread Dave Watts
Why? It will almost certainly be a much better solution than anything else you're considering. Dave - Not sure it's better than 'anything else.' Why stick with a query that'd need constant grouping when what he's got in the DB is a set representing a hierarchical data structure?

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
How would that work since each order can have multiple parts and each part can have multiple line items? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
But since each order can have multiple parts which can have multiple line items, how would that go into a structure? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

RE: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Dawson, Michael
Then, use CFOUTPUT's GROUP attribute to remove the redundancy. m!ke -Original Message- From: Ian Rutherford [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2008 5:05 PM To: CF-Talk Subject: Re: Multiple queries from a CFC? Drop in Array? But since each order can have multiple parts

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Dominic Watson
In this case, I would probably just create a denormalized recordset rather than multiple structures. Yes, I'd either go with this suggestion OR create a method for each of the queries (which would mean scrapping or splitting the storedprocs) .. Doing this increases reusability which I assume

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
I guess I'll do that. So it's a trade off between efficiency and reusability in this case. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Dominic Watson
So it's a trade off between efficiency and reusability in this case. Yes, though I'd imagine the efficiency difference in this case would be neglible. Your current stored proc is executing multiple queries; calling multiple stored procs each with single queries is not going to make a noticeable

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
What would be the best way to write the view for this data? I need to display the main order information first and then loop over the order parts with another loop for each of the order line items for each part. I don't want to be calling the getOrderLineItems query during each order part loop

RE: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Dave Watts
What would be the best way to write the view for this data? I need to display the main order information first and then loop over the order parts with another loop for each of the order line items for each part. I don't want to be calling the getOrderLineItems query during each order part

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
I can do that and it was suggested. I just hate having duplicate query data in every row. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

RE: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Dave Watts
I can do that and it was suggested. I just hate having duplicate query data in every row. Why? It will almost certainly be a much better solution than anything else you're considering. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber

Re: Multiple queries from a CFC? Drop in Array?

2008-07-15 Thread Ian Rutherford
Oh, I don't have a good reason, just habit. ~| 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:

Multiple queries from a CFC? Drop in Array?

2008-07-13 Thread Ian Rutherford
I am trying to move some of my database access to cfcs and am trying to figure out how to get a set of five query results in a stored procedure out of a cffunction. I think I would use an array but am having a hard time visualizing how it would work. The stored proc returns: An order. Each

Re: Multiple queries from a CFC? Drop in Array?

2008-07-13 Thread James Holmes
I'd return a struct. Put each query result into one key of the struct. On Mon, Jul 14, 2008 at 12:43 PM, Ian Rutherford [EMAIL PROTECTED] wrote: I am trying to move some of my database access to cfcs and am trying to figure out how to get a set of five query results in a stored procedure out