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 is the use of token in php?
When to use self over $this?
What does nan stand for computer science?
What are the different errors in php?
How can you tell if a number is even or odd without using any condition or loop?
Why does php start with variables?
what is PDO?
What is the difference between == and === operator in PHP?
How to convert one date format into another in php?
What is php and why it is used?
How to close a session properly?
Write logic to print Floyd's triangle in PHP?
How do I expire a php session after 30 minutes?
How to reset/destroy a cookie in php?
What is session management php?