strange MySQL connect problem
#2

try
pawn Код:
stock CheckMySQL(sqlhost[], sqluser[], sqlpass[], sqldb[])
{
    print("** Trying to connect to mysql server **");
    mysql_connect(sqlhost, sqluser, sqldb, sqlpass);
    if(mysql_ping()==1)
    {
        print("** Server connected **");
        return 1;
    }
    else
    {
        print("** Server couldn't connect to the database, try again.. **");
        mysql_connect(sqlhost, sqluser, sqldb, sqlpass);
        if(mysql_ping()==1)
        {
            print("** Server connected **");
            return 1;
        }
        else
        {
            print("** Server couldn't connect to the database, server shutdown.**");
            SendRconCommand("exit");
            return 0;
        }
    }
}
Reply


Messages In This Thread
strange MySQL connect problem - by BritishBoy - 07.08.2011, 12:41
Re: strange MySQL connect problem - by iJumbo - 07.08.2011, 12:49
Re: strange MySQL connect problem - by BritishBoy - 07.08.2011, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)