SA-MP Forums Archive
How do I set ping on MYSQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do I set ping on MYSQL (/showthread.php?tid=302826)



How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

if(mysql.ping

How do I set this?

is it in the database.sql
or.. the game mode?


It's at like 7532288 and max is 1


Re: How do I set ping on MYSQL - MadeMan - 10.12.2011

You can't set it, it shows your connection status.


Re: How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
You can't set it, it shows your connection status.

Ok.. so how do I change it? or make it change from over 7552348


Re: How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
You can't set it, it shows your connection status.
[21:58:00] >> mysql_ping() - Invalid connection handle. (You set: 7557736, Highest connection handle ID is 1).


Re: How do I set ping on MYSQL - MadeMan - 10.12.2011

Quote:
Originally Posted by FreedomtoLive
Посмотреть сообщение
[21:58:00] >> mysql_ping() - Invalid connection handle. (You set: 7557736, Highest connection handle ID is 1).
The error is about connection handle, not ping.

Show the line in script, where you use mysql_ping.


Re: How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
The error is about connection handle, not ping.

Show the line in script, where you use mysql_ping.
print("MYSQL: Attempting to connect to server...");
samp_mysql_connect(sqlhost, sqluser, sqlpass);
samp_mysql_select_db(sqldb);
if(samp_mysql_ping()==0)
{
print("MYSQL: Database connection established.");
return 1;
}
else
{
print("MYSQL: Connection error, retrying...");
samp_mysql_connect(sqlhost, sqluser, sqlpass);
samp_mysql_select_db(sqldb);
if(samp_mysql_ping()==0)


Re: How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

public MySQLCheckConnection()
{
if(samp_mysql_ping()==0)
{
return 1;
}
else


Re: How do I set ping on MYSQL - Steven82 - 10.12.2011

What MySQL script are you currently editing?


Re: How do I set ping on MYSQL - FreedomtoLive - 10.12.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
What MySQL script are you currently editing?
USING moderntopia game mode!


Re: How do I set ping on MYSQL - Steven82 - 10.12.2011

Are you using the actual one, or the one that was updated to use BlueG's MySQL plugin?