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 are getters and setters php?
What is whitespace in html?
What are the differences between php constants and variables?
Which function is used in php to check the data type of any variable?
Where are sessions stored php?
What is the purpose of php?
What is difference between array_merge and array_combine in php?
Is php secure?
What is difference between static and constant in php?
Why laravel is best php framework?
What is meant by pdo in php?
Define urlencode() and urldecode() used in php?
Can I use php in html?
Tell me how can we get the error when there is a problem to upload a file?
What is c++ polymorphism?