MySQL R7 - NEED HELP
#1

Hi! I want to change my server mysql version into r7 but i have lots of functions like these and i can't make them work
I'm new into R7 so don't blame me

pawn Код:
stock IsPlayerBanned(playerid)
{
    new clanquery[300], banned[100];
    format(clanquery, sizeof(clanquery), "SELECT `Banned` FROM `users` WHERE `Name` = '%s'", PlayerName(playerid));
    mysql_function_query( g_ConnectionHandle, clanquery, false, "", "" );
    mysql_store_result();
    mysql_fetch_row(banned);
    mysql_free_result();
    return strval(banned);
}
stock GetPlayerClan(playerid)
{
    new clanquery[300], PlayerClan[256];
    format(clanquery, sizeof(clanquery), "SELECT `clanname` FROM `users` WHERE `Name` = '%s'", PlayerName(playerid));
    mysql_function_query( g_ConnectionHandle, clanquery, false, "", "" );
    mysql_store_result();
    mysql_fetch_row(PlayerClan);
    mysql_free_result();
    return PlayerClan;
}
Reply
#2

You MUST use seperate callbacks for all queries. There is no way around this. You will likely need to overhaul your whole script.
Reply
#3

So.. can you give me an example of the right way?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)