SA-MP Forums Archive
MySQL Plugin R7 - Non Threaded? - 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 Plugin R7 - Non Threaded? (/showthread.php?tid=473768)



MySQL Plugin R7 - Non Threaded? - Grimrandomer - 04.11.2013

I want to upgrade my script to use the R7 MySQL plugin (https://sampforum.blast.hk/showthread.php?tid=56564) But as it only supports threaded, i'm unsure how best to re-write the following function:

pawn Код:
stock getNewBankAccount(balance) {
    new tenpNewBankNumber = 0, query[300];
    format(query, sizeof(query), "INSERT INTO bankAccounts (accountBalance) VALUES(%i)", balance);
    mysql_query(query);
    tenpNewBankNumber = mysql_insert_id();
    mysql_free_result();
    return tenpNewBankNumber;
}
pawn Код:
new bankAccount = getNewBankAccount(4000);
Any ideas?

Thanks, Grim.


Re: MySQL Plugin R7 - Non Threaded? - HardRock - 04.11.2013

Read this: https://sampforum.blast.hk/showthread.php?tid=337810


Re: MySQL Plugin R7 - Non Threaded? - Grimrandomer - 04.11.2013

Quote:
Originally Posted by HardRock
Посмотреть сообщение
I have already read that, sadly it does not show any way to turn my above code into threaded, as it must all happen within 1 function.