Well...
You have two options:
1. You can make pernament connection, that you open the connection at plugin_init, and closes it at plugin_end
PS: Might be useful to re-open the connection every 200sec, or the server will drop you
2. You can make something like:
PHP Code:
new mysqlconections = 0;
public openmysql(){
if(mysqlconections == 0){
//Conenct to server
}
mysqlconections++;
}
public closemysql(){
mysqlconections--;
if(mysqlconections == 0){
//Close to server
}
}
I do not know how to express that in words D:
__________________