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

What is the difference between php and core php?

935


What is echo in html?

876


What is the difference between require_once and require in php?

1064


Is json a string php?

940


What do you use php for?

994


What is basename php?

957


Why use static methods php?

1043


What is php sequence?

926


Which MySQL function would you use to select a database?

1049


When is a conditional statement ended with endif?

949


How long is csrf token?

908


What is the static variable in function useful for?

945


What is rtrim php?

1005


Which php function will attach one file to another?

971


How to convert strings to upper or lower cases?

986