Posts: 3,351
Threads: 780
Joined: Jan 2010
Hi, i'm using BlueG's MySQL R33 plugin, im getting troubles while compiling this line:
Код:
if(mysql_ping(mConnectionHandle) == -1)
Unknown version mysql_ping.
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
mysql_ping has been removed a long time ago. You do not need to check if the connection is dead so you can reconnect it, there is a parameter (autoreconnect) in mysql_connect which is set to true by default and it will do it for you.
Also update to R39-3.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by Konstantinos
mysql_ping has been removed a long time ago. You do not need to check if the connection is dead so you can reconnect it, there is a parameter (autoreconnect) in mysql_connect which is set to true by default and it will do it for you..
|
Oh right, thanks.
Yes doing now.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Up: Having some problems now while compiling:
PHP код:
for(new connectionCount; connectionCount < MYSQL_CONNECTION_TRIES; connectionCount++)
{
mConnectionHandle = mysql_connect(SQLHost, SQLUser, SQLDatabase, SQLPassword);
if(connectionCount == MYSQL_CONNECTION_TRIES - 1)
{
printf("The server has failed to connect to MySQL the maximum amount of times, shutting down...");
SendRconCommand("exit");
return 1;
}
else
{
printf("Failed to connect to MySQL, retrying...");
}
else
{
printf("The server has successfully connected to MySQL!");
mysql_log(SQLDebug);
break;
}
}
error 029: invalid expression, assumed zero
When the 2nd "else" starts.