Raised This Month: $ Target: $400
 0% 

SQL <-> AMXX Behaviour Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-09-2007 , 10:49   SQL <-> AMXX Behaviour Question
Reply With Quote #1

Simple question:
If there is a connection made to an SQL server (by AMXX) but internet is slooow, lets say it requires 5 seconds, and 3 seconds after that connection started, another connection, for retrieving another players data, is being made, will this second connection be ruined by the dbi_close from the first data-retrieval? If yes, then I already have an idea on how to fix that, if not, then "Hooray!". I am sorry if this has been asked one million times until now, but I did not find thread about this during my search. I am also sorry if this does not perfectly fit into this Topic - well, the fix would be about scripting, at least.
Thanks in advance.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-09-2007 , 11:06   Re: SQL <-> AMXX Behaviour Question
Reply With Quote #2

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:
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-09-2007 , 14:02   Re: SQL <-> AMXX Behaviour Question
Reply With Quote #3

Thats just the Idea I had. ^^
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode