Re: [PHP-DEV] 3.0.10 From: Manuel Lemos (mlemos <email protected>)
Date: 06/20/99

Hello Jason,

On 20-Jul-99 20:38:03, you wrote:

>> > >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

I am too. I guess everybody has their own database interface layer. :-)

>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 :

That would be apropriate in Perl, but I'm afraid it isn't in PHP. The
problem is that you can't store object references. Current PHP always
copies the objects when you try to assign a variable to it.

This is bad because it forces you to use global variables and that
compromises your chances of properly dealing with multiple connections for
instance having each as parameter to custom functions.

The alternative is to assign objects to array positions and use the array
index as your database connection handle. I used that in my database
interface layer and I have a set of interface functions that dereference
the actual object methods.

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

Regards,
Manuel Lemos

E-mail: mlemos <email protected>
URL: http://www.mlemos.e-na.net/
PGP key: finger://mlemos <email protected>

--

-- 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>