fightbulc / simplon_mysql

MySQL PDO Wrapper (php, mysql, pdo, crud, library)
70 stars 22 forks source link

There is no method to close the connection? #4

Closed JunaidQadirB closed 10 years ago

JunaidQadirB commented 10 years ago

I got this message:

User already has more than 'max_user_connections' active connections'

How do i close the connection in Simplon?

fightbulc commented 10 years ago

Hey there. PHP docs state (http://php.net/manual/en/pdo.connections.php):

[...] PHP will automatically close the connection when your script ends.

JunaidQadirB commented 10 years ago

But my sql server connections are exhausting and I'm getting the error

fightbulc commented 10 years ago

Question is how do you handle your connections, how many people wanna connect at the same time and how many connections you allow?

Let me quick add a "close" method you can call to disconnect.

JunaidQadirB commented 10 years ago

Thanks!