SOLVED!
Code: Select all
; ------------------------------------------------------------
; MySQL_Ping - Pings MySQL To Keep An Active Connection
; ------------------------------------------------------------
Procedure MySQL_Ping(Parameter)
Timer = ElapsedMilliseconds()
Repeat
Timed = ElapsedMilliseconds()-Timer
If Timed > 10000
Query = DatabaseQuery(0, "SELECT 1")
If Query
While NextDatabaseRow(0)
PingResult.s = GetDatabaseString(0, 0)
Wend
If PingResult = "1"
Timer = ElapsedMilliseconds()
Else
ConsoleColor(12, 0)
Print("[ERROR] ")
ConsoleColor(7, 0)
PrintN("Lost Connection With MySQL")
EndIf
EndIf
Else
Delay(1)
EndIf
ForEver
EndProcedure




