Re: [PHP-DEV] 3.0.10 From: Jason ZeroDiVide Orcutt (zerodiv <email protected>)
Date: 07/20/99

> > >And in case nobody picked up on it, the dbm abstraction layer (and
> > >what I plan to do with the PDF libs) are in some ways a warmup for
> > >doing an SQL database abstraction layer.
> >
> > Can you tell us more about that SQL abstraction layer that you are
> > planning? What will support? Just queries, or also creation and changing
> > tables, transactions, cursorsm etc.?
>
> A DBI like interface would be cool - and an important argument to
> convert Perl users.

I'm currently working on something along this line. It's completly based
in
php though. I've mirrored some of the functionality in DBI::DBD in such
as
there is a database interface object, and then a query driver. I'm going
to create a high level abstraction class that will allow you to do the
following :

/* Just like dbi::dbd */
$my_db = new Db( 'Mysql' );

$my_db->database = 'foo';
$my_db->user_name = 'bar';

$my_query = $my_db->Prepare( 'SELECT * FROM A_TABLE;' );

while( list( $my_values ) = $my_query->FetchRow() ) {
}

This is the same as :

$my_db = new Mysql_Db();
$my_db->database = 'foo';
$my_db->user_name = 'bar';

$my_query = $my_db->Prepare( 'SELECT * FROM A_TABLE;' );

while( list( $my_values ) = $my_query->FetchRow() ) {
}

The difference is that the Db class wraps a call to the various database
drivers and returns them up.

You can take a look at the incomplete documentation on my devel box, at
http://slipgate.echozone.com/docs

--
________________________________________________________________________
Jason "ZeroDiVide" Orcutt
Current Projects :
[IMP] - http://web.horde.org/imp   [NAG] - http://web.horde.org/nag
Current Todo :
[ME]  - Down for maintiance        [IMP] - http://horde-todo.atcjet.net

-- PHP Development Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>