11.06.2015, 15:11
Well, I downloaded a MYSQL script and was just checking and got something but i don't understand what is this . I mean, WHat i have to put here.
Anyone help me and tell me what i have to put here? I mean, Do i have to put table name or what?
PHP код:
#define SQL_USER_READ "YOUR USER TO READ STUFF FROM MYSQL" //This is the name of the user READ in MySQL
#define SQL_USER_WRITE "YOUR USER TO WRITE STUFF INTO MYSQL" //This is the name of the user WRITE in MySQL
#define SQL_USER_READ_PASS "YOUR PASSWORD FOR THE USER READ" //This is the password for the user READ in MySQL
#define SQL_USER_WRITE_PASS "YOUR PASSWORD FOR THE USER WRITE" //This is the password for the user WRITE in MySQL
PHP код:
forward SQL_DB_CONNECT(db);
public SQL_DB_CONNECT(db)
{
if(db == SQL_WRITE)
{
g_Write = mysql_connect(SQL_HOST, SQL_USER_WRITE, SQL_DB, SQL_USER_WRITE_PASS);
if(mysql_errno() != 0)
{
printf("FAILED CONNECTION TO DATABASE USING %s --- SERVER SHUTTING DOWN ~~~", SQL_USER_WRITE);
SendRconCommand("exit");
}
else
{
printf(" SUCCESSFULLY CONNECTED TO DATABASE '%s' WITH USER '%s'", SQL_DB, SQL_USER_WRITE);
}
}
else
{
g_Read = mysql_connect(SQL_HOST, SQL_USER_READ, SQL_DB, SQL_USER_READ_PASS);
if(mysql_errno() != 0)
{
printf("FAILED CONNECTION TO DATABASE USING %s --- SERVER SHUTTING DOWN ~~~", SQL_USER_READ);
SendRconCommand("exit");
}
else
{
printf(" SUCCESSFULLY CONNECTED TO DATABASE '%s' WITH USER '%s'", SQL_DB, SQL_USER_READ);
print(" ");
}
}
return 1;
}