What is the difference between mysql_connect and
mysql_pconnect ? Which one is good in terms of performance ?

Answer Posted / brijendra

mysql_connect opens a normal connections to mysql database.
mysql_pconnect opens a persistant connection i.e. if there
is any connection open in the script it will use that
connection not making a new connection each time.
at very high traffic enviornment mysql_connect provides
better performance

Is This Answer Correct ?    38 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain $_FILES Superglobal Array?

577


How many open modes available when a file open in PHP?

647


Where to put php files in apache server?

503


What is the role of php?

503


What is polymorphism?

2065






What is cookie and session in php?

502


List types of array are available in php?

542


How should a model be structured in mvc?

523


What is difference between sql and php?

541


What happens when submit button is clicked?

509


What is stdclass in php?

543


If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?

482


Is php difficult to learn?

500


What is PHP? Who is the father or inventor of PHP?

605


What is user defined function in php?

530