Help [Banned] +Rep
#10

pawn Код:
forward ConnectMySQL();
    PlayGaming ConnectMySQL()
    {
        if(mysql_connect(SQL_HOST,SQL_USER,SQL_DB,SQL_PASS))
        {
            printf("[MYSQL]: Connection to `%s` succesful!",SQL_DB);
            mysql_debug(1);
        }
        else
        {
          printf("[MYSQL]: [ERROR]: Connection to `%s` failed!",SQL_DB);
        }
        return 1;
    }

    /*PlayGaming MySQLDisconnect()
    {
        mysql_close();
        return 1;
    }*/


    forward MYSQLBANAT(sqlvalname[], sqlresult[]);
    NiGamig MYSQLBANAT(sqlvalname[], sqlresult[])
    {
        new query[128];
        format(query, sizeof(query), "SELECT Locked FROM players WHERE Name = %d LIMIT 1", sqlvalname);
        mysql_query(query);
        mysql_store_result();
        if(mysql_fetch_row(sqlresult)==1)
        {
            return 1;
        }
        return 0;
    }
L.E: Ok, and doest it shows something wrong in Debug.txt? Like errors, or values that does not correspond?
Reply


Messages In This Thread
Help [Banned] +Rep - by KingPersona - 25.05.2014, 10:42
Re : Help [Banned] +Rep - by S4t3K - 25.05.2014, 10:48
Re: Help [Banned] +Rep - by Koala818 - 25.05.2014, 10:53
Re: Re : Help [Banned] +Rep - by KingPersona - 25.05.2014, 10:55
Re: Help [Banned] +Rep - by KingPersona - 25.05.2014, 10:57
Re: Help [Banned] +Rep - by Koala818 - 25.05.2014, 10:57
Re: Help [Banned] +Rep - by KingPersona - 25.05.2014, 11:04
Re: Help [Banned] +Rep - by Koala818 - 25.05.2014, 11:08
Re: Help [Banned] +Rep - by KingPersona - 25.05.2014, 11:40
Re: Help [Banned] +Rep - by Koala818 - 25.05.2014, 12:48

Forum Jump:


Users browsing this thread: 7 Guest(s)