NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR DB vs successors

David Mintz vtbludgeon at gmail.com
Thu Mar 22 11:56:58 EDT 2007


A couple of naive questions here. I hear PEAR::DB is deprecated in favor of
MDB2. If that's so,

* does that mean we should definitely use MDB2 instead of DB in new projects
that we undertake?

* what is MDB there for?

* DB had a nice autoExecute(), but its counterpart in MDB2 requires you to
tell it the datatype of each parameter. If I intend to use MySQL and not
planning to support other backends (except maybe something like SQLite), is
there any reason not to lie to it and say that everything is 'text'?  My
motivation is Laziness, shorter code, less hard-coded SQL, e.g.:

     $db->autoExecute($this->table, $this->data, DB_AUTOQUERY_UPDATE, $where
);

* Suppose you like the PEAR::Auth module. It supports DB but not its
successors. Write your own storage container that wraps MDB2? Is it worth
it?

Thanks,

-- 
David Mintz
http://davidmintz.org/

En Nueva York el tránsito de la belleza a la desolación sucede siempre
expeditivamente, como si el principio universal de máxima eficiencia hubiera
aconsejado la supresión de gradaciones intermedias.

  -- Antonio Muñoz Molina, Ventanas de Manhattan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070322/a26a1800/attachment.html>


More information about the talk mailing list