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 get and post in php?

1076


Explain PHP looping?

1075


What are php data types?

1032


What is php explain?

1001


What is php glob?

1050


When a conditional statement is ended with an endif?

988


What are the method available in form submitting?

1044


Explain the difference b/w static and dynamic websites?

1083


Explain how can we execute a php script using command line?

1086


What is the major php security hole? How to avoid?

1037


What is difference between strstr() and stristr()?

1167


Which is better php praogramming or cad/cam scope wise and also salaray wise?

2065


Why do we use php?

1006


What is meant by session in php?

975


How to receive a cookie from the browser?

1200