Difference between mysql_connect and mysql_pconnect in php?

Answers were Sorted based on User's Feedback



Difference between mysql_connect and mysql_pconnect in php?..

Answer / md amanullah

mysql_connect opens a normal connections to mysql database.
mysql_pconnect opens a persistant connection i.e. if there
is any connection open in the script it will use that
connection not making a new connection each time. at very
high traffic enviornment mysql_connect provides better
performance.

Is This Answer Correct ?    11 Yes 1 No

Difference between mysql_connect and mysql_pconnect in php?..

Answer / aatit

The following are the differences -

- A new connection is established to the database by using
mysql_connect, where as mysql_pconnect opens a persistant
connection to the database.

- mysql_connect can be used to close the connection, where as
mysql_pconnect can not close the connection.

- Database is opened every time when the page is loaded by
mysql_connect. Whereas by using mysql_pconnect, database need
not be connected every time.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More PHP Interview Questions

m new to xampp i want to configure file server in xampp... is it possible ??? if so help me....

0 Answers  


What is the meaning of symbol '$' in jquery?

0 Answers  


Which function can be used to delete a file?

0 Answers  


how to insert, update data in database

4 Answers  


How to remove the new line character from the end of a text line?

0 Answers  






What is properties of class?

0 Answers  


what is the dirrence in PHP4 & PHP5 . ?

8 Answers  


recurring account in PayPal payment gateway?

1 Answers   A1 Technology, HBL, HBL Power Systems, IBM,


What is foreach loop in php?

0 Answers  


What exactly is PHP?

0 Answers  


What is the difference between for and foreach in php?

0 Answers  


write function of the sentence traversal passing the parameter, e.g input:this is input sentence. output:sentence input is this.

1 Answers   HyperQuality,


Categories