#define SQL_DB "utf8mb4_general_ci"
#6

Code:
#define SQL_HOST "your host"
#define SQL_USER "your user"
#define SQL_DATA "your database name"
#define SQL_PASS "your user password"
And to connect, in OnGameModeInit for example:
Code:
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
Example:
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;
}
Sorry if my english is bad, I'm french.
Reply


Messages In This Thread
#define SQL_DB "utf8mb4_general_ci" - by AIMigboboy - 19.04.2014, 23:59
Re: #define SQL_DB "utf8mb4_general_ci" - by ConnorHunter - 20.04.2014, 00:00
Re: #define SQL_DB "utf8mb4_general_ci" - by AIMigboboy - 20.04.2014, 00:16
Re: #define SQL_DB "utf8mb4_general_ci" - by AIMigboboy - 20.04.2014, 00:25
Re: #define SQL_DB "utf8mb4_general_ci" - by AIMigboboy - 20.04.2014, 00:27
Re : #define SQL_DB "utf8mb4_general_ci" - by Mathieu371 - 20.04.2014, 00:38

Forum Jump:


Users browsing this thread: 1 Guest(s)