On 7/18/05, Pat Branley <[EMAIL PROTECTED]> wrote:
> Chad
> 
> I dont think thats a good idea from a readability perspective. How can
> you tell what the query does when you read the code if there a a SQL
> fragments stored in variables all over the place. Plus then have to
> manage your own escaping of params to the query. Debuggging nightmare.

Thanks, Pat.  Actually, readability is exactly why I did it.  Because
I abstract the snot out of my application, I never know the query SQL
until the page is processed.  Table names, column names, filters,
everything is stored in the DB.  Running all that inside the query
would be a nightmare to manage.  The plus side is I only have a single
query call for an infinite number of pages in my app.

To debug, I just wrap the SQL variables in a cfoutput before the query
is run.  If I can't figure it out by looking at it, I just copy and
paste it into a SQL editor (currently MS Access) to see where it karks
it.

Chad
who found Pat's 2c quite valuable and welcomes any change thrown his way

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to