In my case they provide too little abstraction. I wanted to isolate the
database, queries et al, completely from the application code. For my own
abstraction layer, it was more straight forward to call the PHP functions
directly.
Uzytkownik "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@rediffmail.com> napisal w
wiadomosci news:abc4d8b8.0402132303.4797b48d@posting.google.c om...[color=blue]
> "Ruby Tuesday" <rubytuezdayz@yahoo.com> wrote in message[/color]
news:<c0jfds$17q3ro$1@ID-205437.news.uni-berlin.de>...[color=blue][color=green]
> > Which one is better to do dynamic websites using MySQL? Thanks
> >
> > a.. ADODB,
http://php.weblogs.com/ADOdb/
> > b.. Metabase,
http://www.phpclasses.org/browse.html/package/20.html
> > c.. PEAR::DB,
http://pear.php.net/manual/en/core.db.php
> > d.. PHPLib database wrappers,
http://sourceforge.net/projects/phplib[/color]
>
> In the company I work for, we're preparing some framework for our
> projects. When we tried the above, we find that they all go for "too
> much" abstraction---which is somewhat messy. Say for example, they
> check the choosen DB and then use the appropriate function for that
> DB.
>
> If you like procedural style, you better to go for
> <http://in2.php.net/dbx>
>
> For us, we decided to go for our simple abstraction so that when
> to switch to another DB, just it is enough to touch the class alone.
>
> Example:
>
> class DB
> {
> //var ...
> function DB() ///constructor
> {
> ///...
> }
> function dbConnect()
> {
> mysql_connect(); // or pg_connect(); or whatever
> //...
> }
> function dbClose()
> {
> mysql_close(); // or pg_close(); or something else
> //...
> }
> function dbQuery()
> {
> mysql_query();
> //...
> }
> function dbFetchArray()
> {
> mysql_fetch_array();
> //...
> }
> function dbGetError()
> {
> mysql_error();
> }
> function dbGetErrno()
> {
> mysql_errno();
> }
> }
>
> --
> "Success = 10% sweat + 90% tears"
> If you live in USA, please support John Edwards.
> Email: rrjanbiah-at-Y!com[/color]