Each instance of Zend_Db_Adapter should never create more than one connection.

The _connect() method is a no-op if you are already connected. It does not create a new connection each time you use quoteInto().

Calling getConnection() also returns the existing connection. It creates a new connection only if you weren't connected yet. This is part of the lazy-connection logic.

Regards,
Bill Karwin

On May 24, 2010, at 7:14 AM, Саша Стаменковић wrote:

I'm asking because I see quote method in exception trace:


2010-05-20T10:08:40+02:00 ERR (3): exception 'Zend_Db_Adapter_Mysqli_Exception' with message 'User *** already has more than 'max_user_connections' active connections' in Zend/Db/ Adapter/Mysqli.php:333
Stack trace:
#0 Zend/Db/Adapter/Abstract.php(832): Zend_Db_Adapter_Mysqli- >_connect() #1 Zend/Db/Adapter/Abstract.php(902): Zend_Db_Adapter_Abstract- >quote('582', NULL) #2 Zend/Db/Select.php(1000): Zend_Db_Adapter_Abstract- >quoteInto('table...', '582', NULL) #3 Zend/Db/Select.php(475): Zend_Db_Select->_where('table...', '582', NULL, true)
...

Regards,
Saša Stamenković


Reply via email to