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

How to read and display a HTML source from the website url?

920


Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

906


Is it possible multiple inheritance in php?

967


What does PEAR stands for?

1006


What is the difference between php and core php?

886


Is null empty php?

962


How to convert strings in hex format?

960


What is the functionality of md5 function in php?

973


Can we override static method in php?

1016


What is the difference between for and foreach in php?

972


What is difference between post and put in rest?

952


What is static in php?

943


Explain Constant in Class?

963


Explain the differences between get and post methods?

917


How to define a user function?

958