Now it seem that the functionality of the two queries is close enough
that you could do something like this (option #1):
SELECT id, name
FROM my_table
WHERE col =
ORDER BY name, id
If that works for your situation, that's what I'd do, I think. Unless
the name field is friggin' huge (which I
I would think because sometimes you would need to pass in not only the field
names to select but also some criteria as to how it is grabbed. Such as
something that needs to go into the FROM or WHERE portions of the query. For
the example Russ gave you would need to pass in the name of the
column(c
PROTECTED]
>Sent: Sunday, December 18, 2005 2:11 PM
>To: CF-Talk
>Subject: Re: CFC Function Style
>
>Using the third style, the first SQL is looking for a single piece of data
>(an int) while the second SQL is looking for 2 (and int and a varchar). The
>first is also using a
nters
WHERE center=
ORDER BY center
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 18, 2005 2:11 PM
To: CF-Talk
Subject: Re: CFC Function Style
Using the third style, the first SQL is looking for a single piece of data
(an int)
I did something similar to the 1st then with the exception of I did not do a
check to see if the argument existed. I had two arguments one being "ID"
and the other "LEVEL" Both required but with a default set to the "LEVEL"
So I would then do a check to see if Arguments.LEVEL NEQ "whatever the
de
Using the third style, the first SQL is looking for a single piece of data
(an int) while the second SQL is looking for 2 (and int and a varchar). The
first is also using a param where the second doesn't have one. I just don't
like returning more data than is needed.
Select centerid
from
Just recently I did the first option and it was more from the stand point of
I did not see any value to having a separate function for each need like
this. Seems like there is not a huge difference between the 1st and 3rd,
both use a CFIF to decide how the output of the function is going to be.
On
This is more of a style question than anything else. Lets say you have a CFC
that will be doing all the work for an application. There is need for two
different queries. The first gets an ID based on a passed value. The second
uses the same table but returns the id as well as a name and does not
8 matches
Mail list logo