Ver Mensaje Individual
  #10 (permalink)  
Antiguo 12/01/2006, 13:36
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Con conexiones persistentes lo que guarda tu BD (Mysql por ejemplo) es la referencia de tu cliente que la abrió.

Las conexiones persistentes no mueren con "mysql_close()":

Cita:
mysql_close() closes the non-persistent connection to the MySQL server that's associated with the specified link identifier. If link_identifier isn't specified, the last opened link is used.
http://www.php.net/mysql_close

El comentario iva por el lado que siempre se ha de hacer:
msyql_connect()

o en tu caso:
mysql_pconnect()

Será Mysql el que decida si el "link" de conexión para ese cliente sigue activo para continuar usandolo o bien crear uno nuevo.

Cita:
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.

Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
http://www.php.net/manual/en/functio...l-pconnect.php

(Por mi parte siempre he usado mysql_pconnect() .. no he probado a quitarselo a ver como se comporta ..pero en tal caso que pasaría si se pierde la conexión persistente? .. Usando mysql_pconnect() siempre .. es Msyql el que decide si re-conectar o seguir usando una en curso).

Un saludo,