Quote:
Originally Posted by K.K.Lv
another problem , I think you have to consider the handler of the connection, I think most of coders knowing the error code of MySql, like "CR_SERVER_GONE_ERROR(error No. is 2006)" and the "CR_SERVER_LOST(error No. is 2013)", so I suggest you that check whether the handler of the connection is valid or not before you execute the query
|
Best way is using mysql_pconnect().
I like how oracle drivers works with tns names.
You have a connection pool for a unique name (can have more than 1 different pool). Then you can tell your app to use that pool for each operation. The drivers itself handle reconnection (can be achieved with mysql_pconnect).
__________________