20.04.2014, 00:38
Code:
#define SQL_HOST "your host" #define SQL_USER "your user" #define SQL_DATA "your database name" #define SQL_PASS "your user password"
Code:
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
Code:
#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_DATA "samp"
#define SQL_PASS ""
public OnGameModeInit()
{
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
if(mysql_ping()) print("Connected to the MySQL database.");
else print("Error while trying to connect to the MySQL database.");
return 1;
}

