What is the difference between mysql_connect() and
mysql_pconnect()?

Answer Posted / sumit

In mysql_pconnect(), ‘p’ stands for persistance connection.

when connecting, the function would try to find a (persistent) connection that’s already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection.


mysql_connect() function, every time it is opening and closing the database connection.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is max connection in mysql?

551


Write a query to display current date and time?

577


What is a session in mysql?

546


Can't connect mysql server on localhost?

568


using primary can we relate two table, with out foreign key?

2346






How do I restore a database in mysql workbench?

551


What is sqlyog?

674


What is federated tables in mysql?

532


Why we use mysql workbench?

520


How can I create a database in mysql?

524


How do I show all mysql databases?

561


What is a table schema?

594


How show all tables in mysql query?

525


Where is the mysql database stored?

544


Is mongodb faster than mysql?

549