MySQL problem
#1

Code:
[18:06:03] CMySQLHandler::Query(SELECT * FROM `Igraci` WHERE `Ime` = 'Frankie_Marcello') - An error has occured. (Error ID: 2013, Lost connection to MySQL server during query)
I'm using G-sTyLeZzZ's MySQL plugin.
My server is on Windows but web server is on Linux.

I get this error everytime when I connect to server. What is the problem? :/
Reply
#2

It resets your connection over time. Happened to me. I all did was make a timer and check for the mysql_ping
if it returned 0 i used the mysql_reconnect function.

pawn Code:
SetTimer("CheckConn", time, true);

forward CheckConn();
public CheckConn()
{
    if(mysql_ping() == 1)
    {
        // Connection alive
    }
    else
    {
        mysql_reconnect();
        // Connection was dead
    }
}
Reply
#3

It works, thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)