Home > DeveloperSection > Interviews > What is difference between mysql_connect and mysql_pconnect?

Posted on    June-13-2011 6:06 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  1655  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    June-13-2011 12:00 AM

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.


Don't want to miss updates? Please click the below button!

Follow MindStick