06-27-2008, 03:07 PM
|
#3 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Basically there are some major differences: - mysql_pconnect creates a 'persistent' connection therefore the link to the database is always open, mysql_connect however isnt like that and its links are closed when the script finishes and therefore must be reopened.
- mysql_pconnect searches for exisiting persistent connections ans re-uses them if they are found, mysql_connect on the other hand, does not.
- Links created with mysql_pconnect cannot be closed with mysql_close
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 06-28-2008 at 01:58 PM.
Reason: added 'persistent' to clarify my point
|
|
|
|