Difference between mysql_connect and mysql_pconnect in php?
Answer Posted / 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 View All Answers
What types of Data Can Be Used as Array Keys?
Can we extend two classes in php?
What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?
How do you end php?
Explain Booleans in PHP?
What is the use of callback in php?
What are php variables?
What is static variable in php?
What does mvc stand for and what does each component do?
Declare a new variable in php equal to the number 3;
Explain me soundex() and metaphone()?
What is x+ mode in fopen() used for?
What is the output of the following php code?
Explain the types of string comparision function in PHP
Please explain is it possible to use com component in php?