22.04.2011, 17:59
Is it possible to connect Windows server with MySQL server if that MySQL server is on Linux?
stock SpojiSeSaBazom()
{
if(mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS)) print("Spajanje sa MySQL bazom je uspesno!"); // if is succsessful
else print("Spajanje sa MySQL bazom nije uspelo..."); // if is unsuccessful
}
public OnPlayerConnect(playerid)
{
new ime[MAX_PLAYER_NAME];
GetPlayerName(playerid, ime, sizeof ime);
new string[64];
format(string, sizeof(string), "SELECT * FROM Igraci WHERE Ime = '%s'", ime);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows() != 0) SendClientMessage(playerid, 0xFFFFFFFF, "Your account exists in database!");
else SendClientMessage(playerid, 0xFFFFFFFF, "Your account doesn't exists in database!");
}