Possible duplicates: http://stackoverflow.com/questions/39753/connection-pooling-in-php and http://stackoverflow.com/questions/830707/php-connection-pooling-mysql
I used to restore connections in $_SESSION.
but found it not good.
Possible duplicates: http://stackoverflow.com/questions/39753/connection-pooling-in-php and http://stackoverflow.com/questions/830707/php-connection-pooling-mysql
I used to restore connections in $_SESSION.
but found it not good.
Duplicate(or this), please use the search function before posting new questions. Actually it searches for you when you ask, so at least read those suggestions.
It is impossible to implement a database pool in php, because each request runs in a completely new process. There is nothing that survives between requests. The library may have its own database pool (In the mysql api, it's called persistent connections). For mysql, it's moot point though, since the cost of establishing a new connection is minuscule.