SA-MP Forums Archive
MySQL R7 - NEED HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL R7 - NEED HELP (/showthread.php?tid=397743)



MySQL R7 - NEED HELP - nGen.SoNNy - 06.12.2012

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;
}



Re: MySQL R7 - NEED HELP - Vince - 06.12.2012

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


Re: MySQL R7 - NEED HELP - nGen.SoNNy - 06.12.2012

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