SQL PHP HTML ASP JavaScript articles and free scripts to download If you are facing any problem in viewing this page, please tell us
 

PHP MySQL Persistence Connection


Please read mysql_connect to know all details about connecting the mysql database. Here we will see the difference between mysql_connect and mysql_pconnect function. Mysql_pconnect works same as mysql_connect with two differences. Mysql_pconnect function keeps the connection live even the script execution is over. It does not close the connection like mysql_connect case where it closes the connection once the script execution is over. The other difference is it tries to find any existing connection exists and return a identifier if exists.

The main purpose of using mysql_pconnect function is to maintain a persistence connection to the mysql server. Function mysql_close() can't close persisitence connection.

mysql_pconnect ("$servername","$dbuser","$dbpassword");



boobalan03-07-2009
your tutorials are more useful to me
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked
Sections
PHP
JavaScript
ASP
HTML
SQL
Photoshop
Articles SEO
SQL Tutorial List
SQL site Map
Knowledge Management
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.