11.10.2010, 16:11
Oh my god. Start learning MySQL from begining. This isn't dini.
WHERE (`id` = '%s')
WHERE (`id` = '%d')
format(query, sizeof(query), "UPDATE `players` SET `PlayerLevel`='%d', `AdminLevel`='%d', `DonateRank`='%d' WHERE `id` = '%d'", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pDonateRank], PlayerInfo[playerid][pSQLID]);
mysql_query(query);
// If query is long, continue this
format(query, sizeof(query), "UPDATE `players` SET `UpgradePoints`='%d', `ConnectedTime`='%d' WHERE `id` = '%d'",PlayerInfo[playerid][gPupgrade], PlayerInfo[playerid][pConnectTime], PlayerInfo[playerid][pSQLID]);
mysql_query(query);
UPDATE players SET PlayerLevel=%d, AdminLevel=%d, DonateRank=%d WHERE id=%d
# mysql_ping( [connectionHandle = 1] ) * Returns true (1) if the connection is alive, else (-1) |
0 if alive, 1 if dead. if(!mysql_ping()) print("MySQL connection is still alive!"); if(mysql_ping()) print("MySQL connection is dead!"); |
if(mysql_ping())
{
CONNECTION is true
}
if(!mysql_ping())
{
CONNECTION is false
}
On the other side it's not logical for MySQL to return " !mysql_ping() " as true, because ! means false...
|
Return Values Zero if the connection to the server is active. Nonzero if an error occurred. A nonzero return does not indicate whether the MySQL server itself is down; the connection might be broken for other reasons such as network problems. |
main() { }