Code:
--------------------------------TIMER function GlobalTimer.OnTimer(nID) if nID == 77 then if keep_connection_alive == true then for id in rows(MySQLConnection, "SELECT users.id FROM users LIMIT 0, 1;") do end end end end --------------------------------END TIMER
and after executing every query I set keep_connection_alive = true
The timer is fired every one minute and execute a query that does not slow down the application or the mysql server.
Maybe this is not the right way, but in my case I was obliged to use this.
Leave a comment: