2009年4月20日星期一

Re: [fw-db] Using an already existing database connection resource with Zend_DB

Aloha Ralph,

thanks for your reply!

Unfortunately TYPO3 uses ext/mysql only,
no chance using mysqli, as I would need to rewrite
the whole dba classes etc.

I will go for 2 connections then - in mind, that Zend_Db
uses lazy loading anyway.

Btw. as I can choose now, which Adapter makes sense?
The plain MySQLi adapter or the PDO version of it?

Thank you for your help,
Thasmo


2009/4/20 Ralph Schindler <ralph.schindler@zend.com>:
>
>> MySQL Connection Resource established via mysql_connect().
>
> That is the problem actually.  We do not have an ext/mysql based adapter
> (and for a few good reasons).
>
> If they have a ext/mysqli adapter that would work as we have a
> Zend_Db_Adapter_Mysqli one, and the pdo based one i mentioned before.
>
> But i think you are kinda stuck at the moment since you'd have to open 2
> connections.  The good news might be though, depending on your use case,
> each request might not have 2 connections.  Zend_Db adapters only make a
> connection on first use (lazy loading).  So if you selectively use the
> Zend_Db_Adapter it will only be on those request that use features that
> consume the adapter.
>
> -Ralph
>

没有评论: