29.01.2010, 05:05
It's my function
But now I reailised that there's no need to use this query because if you set the auto_login in mysql_connect to 1, it'll just reconnect as it loses the connection.
pawn Код:
stock query(query[])
{
if(mysql_ping()!=0)
{
if(mysql_connect(SQL_HOST,SQL_USER,SQL_DB,SQL_PASS))
{
print("MySQL has successfully reconnected due to ping time out.");
mysql_query(query);
printf(query);
}
else
print("MySQL has failed to reconnect (due to time out).");
}
else
{
mysql_query(query);
printf(query);
}
}