Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / jyotisankar pradhan

mysql_connect open a new connection to the database

but mysql_pconnect open a persistant connection to the database

Is This Answer Correct ?    80 Yes 11 No

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

Answer / amita

mysql_connect everytime open a new connection to the database


while using mysql_pconnect , the function would first try to
find a (persistent) link 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...
the connection to the SQL server will not be closed when the
execution of the script ends. Instead, the link will remain
open for future use.

Is This Answer Correct ?    72 Yes 4 No

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

Answer / jayapirakash

Mysql_connect()->we can colse the datedase
Mysql_pconnect()->we can't close the datadase

Mysql_conect()->opens the database every time page is load
Mysql_pconnect()->Need not to the every time page load

Is This Answer Correct ?    48 Yes 11 No

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

Answer / nishant patel

mysql_pconnect uses less resources, because it does not need
to establish a database connection every time a page is loaded.
persistant = continuously

Is This Answer Correct ?    14 Yes 1 No

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

Answer / pavan

point 4 is absolutely right.

Is This Answer Correct ?    9 Yes 1 No

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

Answer / pramod kumar

1. mysql_pconnect() creates the persistent connection,mysql_connect not create persistent connection to the database.
2. mysql_connect() connection automatically disconnected after execute the code but mysql_pconnect() not.

Is This Answer Correct ?    8 Yes 2 No

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

Answer / 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

More MySQL Interview Questions

State the differences between mongodb and mysql.

0 Answers  


how to find 2nd highest salary in random database salary of employer.....

4 Answers  


What do we use to remove duplicate records while fetching a data in mysql ?

0 Answers  


Where’s database data actually stored? Is there a way to see the files which are stored?

0 Answers  


how we can find nth max salary from an employe table by using my sql?

8 Answers  


What does tee command do in MySQL?

1 Answers  


What is mysql community edition?

0 Answers  


What is 'mysqldump'?

0 Answers  


What are the 3 main types of search queries?

0 Answers  


How do I view tables in mysql workbench?

0 Answers  


What is mysqlcheck do?

0 Answers  


Explain MySQL architecture?

1 Answers  


Categories