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.8.3-1
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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6764
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
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.8.3-1
Operating System: windows ultimate(32)

Re: sql function

Postby lindamartin » 31. July 2013 11:26

mysql_connect() is better.
lindamartin
 
Posts: 1
Joined: 21. July 2013 04:51
XAMPP Version: 1.8.3-3
Operating System: Win 7


Return to PHP

Who is online

Users browsing this forum: No registered users and 3 guests