sql function

Alles, was PHP betrifft, kann hier besprochen werden.

sql function

Postby alexreborn » 21. August 2012 19:56

mysql_connect() or mysql_pconnect()
which one is better??? i knw that later keeps connection open even after close to close(). in server mode is this dangerous and how??? answrs plzzz
alexreborn
 
Posts: 4
Joined: 18. August 2012 15:08
XAMPP Version: 1.7.3
Operating System: windows ultimate(32)

Re: sql function

Postby Altrea » 22. August 2012 00:05

Noone is better then the other. Both have their pros and cons.
persistent connections can give you a speed gain while non persistent connections are more memory effective.
In my opinion, use non persistent connections until you really need the persistent one somewhere.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4486
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.0
Operating System: W7Ux64

Re: sql function

Postby alexreborn » 22. August 2012 18:23

but mysql_pconnect() does not close connection.. does this feature does not pave way for security threats??
alexreborn
 
Posts: 4
Joined: 18. August 2012 15:08
XAMPP Version: 1.7.3
Operating System: windows ultimate(32)


Return to PHP

Who is online

Users browsing this forum: No registered users and 2 guests