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 ? Which one is good in terms of performance ?

Answer Posted / amit

The mysql_pconnect() function opens a persistent MySQL
connection.

This function returns the connection on success, or FALSE
and an error on failure. You can hide the error output by
adding an '@' in front of the function name.

mysql_pconnect() is much like mysql_connect(), but with two
major differences:

•This function will try to find a connection that's already
open, with the same host, username and password. If one is
found, this will be returned instead of opening a new
connection
•The connection will not be closed when the execution of
the script ends (mysql_close() will not close connection
opened by mysql_pconnect()). It will stay open for future
use

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are sessions stored php?

1020


Tell me what is htaccess?

918


What is action hooks and filter hooks?

876


Tell me what is the difference between ereg_replace() and eregi_replace()?

1140


Do you know what are traits?

1006


Why json is used in php?

992


What is in a cookie?

964


What is cookies? How to create cookies in php?

956


How do you define a constant?

962


How can I learn php fast?

1071


Where do we use get and post?

969


How many days will it take to learn php?

1064


What is strcmp?

949


What is the best php framework 2018?

1010


Tell me whether it is possible to share a single instance of a memcache between multiple php projects?

983