Re: SQL Encapsulation?

2006-02-03 Thread Robertson-Ravo, Neil (RX)
riginal Message- From: Baz <[EMAIL PROTECTED]> To: CF-Talk Sent: Fri Feb 03 15:14:27 2006 Subject: RE: SQL Encapsulation? Hi Gang, Found your messages in my Junk Mail - was wondering why no-one responded! Brian you're right on all fronts. The example I gave was a paging one, but

RE: SQL Encapsulation?

2006-02-03 Thread Baz
TED] Sent: Friday, February 03, 2006 11:25 AM To: CF-Talk Subject: Re: SQL Encapsulation? Well, we were both interpreting your request a bit incorrectly then. But, I'm not sure I have an answer for you on this one. It's not something I'd do. I'd be more apt to make a view that &qu

Re: SQL Encapsulation?

2006-02-03 Thread Deanna Schneider
representations of the > same base. > > So SQL being a form of code like any other, should be re-used and > encapsulated like any other. It doesn't seem proper to have to find and > paste the same changes in 15-20 methods just because a little logic in the > SQL changes. > >

RE: SQL Encapsulation?

2006-02-03 Thread Baz
a little logic in the SQL changes. Thoughts? Baz -Original Message- From: Brian Peddle [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 9:07 AM To: CF-Talk Subject: RE: SQL Encapsulation? I was basing my assumptions on writing these same things over and over from job to job for p

RE: SQL Encapsulation?

2006-02-03 Thread Brian Peddle
Sent: Friday, February 03, 2006 8:08 AM To: CF-Talk Subject: Re: SQL Encapsulation? Well, first of all, I didn't read his initial question to be one of pagination, which is what you're implying. I read it as one of reusing query results in multiple ways. In that scenario, you could very easi

Re: SQL Encapsulation?

2006-02-03 Thread Deanna Schneider
l get him what he wants. > > > > He has query #1 which will get the total records for a query. > > Query #2 just returns 50 records of the total. > > > > So when you display results you see. > > > > Total: Records 4530 Displaying Records: 101-150. >

RE: SQL Encapsulation?

2006-02-02 Thread Brian Peddle
, February 02, 2006 2:39 PM To: CF-Talk Subject: Re: SQL Encapsulation? pseudo-code... Select blah blah From Blah blah WHERE blah blah select * from

Re: SQL Encapsulation?

2006-02-02 Thread Deanna Schneider
:[EMAIL PROTECTED] > Sent: Thursday, February 02, 2006 1:43 PM > To: CF-Talk > Subject: Re: SQL Encapsulation? > > I'd go the cfc route, where I would instantiate a single CFC that would > run > your base query with all your where and from clauses.

RE: SQL Encapsulation?

2006-02-02 Thread Brian Peddle
cords just to display 50 he is just bringing back what he needs. -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, February 02, 2006 1:43 PM To: CF-Talk Subject: Re: SQL Encapsulation? I'd go the cfc route, where I would instantiate a single CFC that

Re: SQL Encapsulation?

2006-02-02 Thread Deanna Schneider
I'd go the cfc route, where I would instantiate a single CFC that would run your base query with all your where and from clauses. Then, I'd have multiple functions that would do query of query against that base query. ~| Message:

RE: SQL Encapsulation?

2006-02-02 Thread Brian Peddle
I just rewrote a query as a test a few weeks ago that replaced what you have below. The search would query for a count first then grab the 50/100 etc records to be displayed for paging. When someone queried the whole database it was taking upwards of 50 seconds to run both queries. I moved them