0
votes

I have made a script using the following library;

http://www.autohotkey.com/board/topic/72629-mysql-library-functions/

to connect to my non-local database. However I'm issuing some max_user_connections problems and I think this is due to the fact that I never close the database connection.

I can't seem to find a way to do that using this library but I am not certain, maybe theres a way to close any connection to the internet or any database or whatever that would work build-in in AHK?

Script:

    hi() {

mysql := new mysql
db := mysql.connect("x","x","x","x")     ; host,user,password,database

if db =
    return

sql = 
(
    UPDATE something
       SET yo = yo+1
     WHERE id = 1
)

result := mysql.query(db, sql)

}

Thanks in advance

1
It might help if you posted the script itself as well.Gary Storey
@GaryStorey here you go sir.hulahi
The class doesn't seem to have a disconnect function. You should try to find documentation on the DLL that is used in the class.Forivin

1 Answers

0
votes

The DLL of the AHK script has the mysql_close function, but it's not coded into the AHK library.

You can technically manually call the DLL just like the AHK and see if it'll work.

Since I also need to connect to a MySQL DB via AHK, I'll update this answer when a full solution is available.

enter image description here