Difference between mysql_connect and mysql_pconnect?



Difference between mysql_connect and mysql_pconnect?..

Answer / Lalit Tomar

mysql_connect() establishes a new connection to the MySQL server each time it is called. On the other hand, mysql_pconnect() reuses an existing persistent connection if one is available, or creates a new persistent connection that can be used for future queries. The main advantage of using mysql_pconnect() is faster connection times as it eliminates the overhead of establishing a new connection.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

When a conditional statement is ended with an endif?

1 Answers  


What the limitation of header() function in php?

1 Answers  


What is csrf token in php?

1 Answers  


What is the use of return in php?

1 Answers  


Does php have block scope?

1 Answers  


What is cakephp framework?

1 Answers  


What are the final class and final method?

1 Answers  


What are the advantages of object-oriented programming in php?

1 Answers  


What is difference between isset and empty in php?

1 Answers  


Why do we use query?

1 Answers  


PHP serverside scripting language or client side scripting language>

8 Answers  


What is a procedure in php?

5 Answers   Wipro,


Categories