On Tue, Oct 05, 2004 at 10:56:14PM -0400, [EMAIL PROTECTED] wrote:
> > Do you use Class::DBI to manage the database integration? 
> 
> Actually, I'm so often working on many tables at once that I write the
> SQL myself (with help from my DBA... :-) and go for straight DBI. Often
> I'm having to use temporary tables and/or multiple joings to get at my
> data, so Class::DBI won't work. (The joy and bane of relational dbs is
> the relational element.)

At the cost of starting to sound like a Class::DBI evangelist, I think
it's important to point out for those considering CDBI that using custom
SQL does not necessary mean CDBI is ineffective. For me, one of the
biggest sellers of the module was that all of my SQL statements could be
stored in one place.

In fact, it's not even necessary to return CDBI objects; you could have
your code return an array. I have a function called sql_hash which
returns a list of hashes. I used to use this function for my select
statements before switching to CDBI. It occasionally comes in handy when
I have a complex join which I don't want to map to objects.

OK, I'll be quiet now.


William

-- 
Knowmad Services Inc.
http://www.knowmad.com

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to