Ben Sgro (ProjectSkyline) wrote:
I suppose I can use PEAR:DB:SQLwhatever, but I'm intimate
what my SQL code and don't want to give it up.
I've mostly worked with ADODB. When I last looked, ADODB was far ahead of PEAR:DB, but it looks like PEAR:DB has come a long way.

I have a few serious complaints with ADODB, but it sure beats having to switch between a few database APIs to do my work. Things I'd like to see in a database API are:

(i) no use of globals to switch between numeric and associative result sets
(ii) lazy initialization of database connections ('create' the connection early in your app, but don't suffer the overhead of using it until you need it)
(iii) a subdivision of database exceptions,  so I can write something like

try {
   $db->Execute("INSERT ...");
} catch (DuplicateKeyException $e) {
...
};

The 'spring' framework in Java does something like this.

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to