mysql_connect vs mysql_pconnect php

What is differenc between mysql_connect and mysql_pconnect?
MYSQL CONNECT: mysql_connect()
When we use mysql_connect() function, every time it opens and closes the database connection, depending on the request.

MYSQL PCONNECT: mysql_pconnect()
This function would try to find a (persistent) connection 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.
After the processing is done the connection will not be closed even if you use mysql_close.


Post a Comment