Am I reinventing the wheel?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

It's my understanding that a persistent connection is shared between all active sessions. The only difference is that you don't incur the overhead of re-connecting/authenticating between PHP and MySQL all the time. Am I mistaken?

If that's the case, the only time when you'll be left with an idle connection is on a server that has virtually no traffic (in which case you can probably afford the extra resources!)

Also, after a little checking, MySQL_close() doesn't affect persistent connections at all.
Post Reply