Connecting to database everytime You make an instance
View Single Post
06-14-2010, 03:47 AM
Join Date: Sep 2007
Originally Posted by
Hi there VI,
I followed the link You gave me just to arrive to another link on the php.net website that simply disadvices people from using pconnect (persistent connections).
I was decided to change my instruction to mysql_pconnect(), but after reading the contents of that
, it made me think a lot, and also I have never really had a problem with my using of mysql_connect(), so I will stick to it.
Thank You for Your suggestion though,
I am not intimately familiar with persistent connections on a mysql server, but when I used them on an IIS server (running SQL Server 2005) it fixed the connection errors we were having. Perhaps Microsoft has done a better job implementing them.
As long as your class is not opening and closing the connection on each query, a large number won't be a problem. But opening and closing them repetitively will cause trouble for you if you get decent traffic.
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot