Sara Leavitt wrote:
Hi,
We are about to convert all of our queries using mysql_pconnect to
prepared statements using PDO database connections. It will take some
time to convert the hundreds of SQL statements so the plan is to do it
in phases. Is it a bad idea to have both a mysql_pconnect and
Hi Lester,
Our application is not using php transactions (e.g., COMMIT, ROLLBACK
etc.), so I think we are safe there. Are you saying that even if both
the mysql_pconnect and PDO connection are persistent that they will be
completely separate? (Havn't had a chance to test this empirically
Sara Leavitt wrote:
Hi Lester,
Our application is not using php transactions (e.g., COMMIT, ROLLBACK
etc.), so I think we are safe there. Are you saying that even if both
the mysql_pconnect and PDO connection are persistent that they will be
completely separate? (Havn't had a chance to
So I can see that using two connections for updating might get out of
synch; however, mixing the connections should be OK for a series of
SELECT queries on the read-only side of the application, right?
-Sara
Lester Caine wrote:
Sara Leavitt wrote:
Hi Lester,
Our application is not using
Sara Leavitt wrote:
So I can see that using two connections for updating might get out of
synch; however, mixing the connections should be OK for a series of
SELECT queries on the read-only side of the application, right?
Yes - if you are only reading already stored data there should not be
One thing to be careful is if you are relying on 'transactions' to handle
anything. Obviously the transaction has to be in the same connection just to
work. Despite what others have said, the PDO connection will be different to
the generic mysql connection as it is a separate process.
Andy Shellam (Mailing Lists) wrote:
First, when connecting, the function would first try to find a
(persistent) link that's already open with the same host, username
and password. If one is found, an identifier for it will be returned
instead of opening a new connection.
Therefore,
How about combining MySQLi with mysql_pconnect? Assuming both are
persistent, would those connections be shared?
The goal here is to use prepared statements. I read that MySQLi only
supports persistent connections in php version 5.3 which we are not yet
running, but perhaps it would be
Sara Leavitt wrote:
How about combining MySQLi with mysql_pconnect? Assuming both are
persistent, would those connections be shared?
The goal here is to use prepared statements. I read that MySQLi only
supports persistent connections in php version 5.3 which we are not yet
running, but