C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers


10,705 users

Difference between mysql_connect and mysql_pconnect?

0 votes
asked Jan 2, 2014 by sara Guru (24,570 points)

1 Answer

0 votes
There is a good page in the php manual on the subject, in short mysql_pconnect() makes a persistent connection to the database which means a SQL link that do not close when the execution of your script ends. mysql_connect()provides only for the database new connection while using mysql_pconnect , 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... 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.
answered Jan 2, 2014 by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 72 views
0 votes
1 answer 80 views
80 views asked Oct 15, 2011 by snag Jr Member (370 points)
+1 vote
1 answer 71 views
0 votes
1 answer 77 views
0 votes
1 answer 423 views