What is differenc between mysql_connect and mysql_pconnect?
Mysql_connect opens up a database connection every time a page is loaded. mysql_pconnect opens up a connection, and keeps it open across multiple requests.
Mysql_pconnect uses less resources, because it does not need to establish a database connection every time a page is loaded.
First, when connecting, the function would first try to find a link that’s already open with the same host, username and password. Second, the connection to the SQL server will not be closed when the execution of the script ends.












