04.11.2013, 12:00
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:
Any ideas?
Thanks, Grim.
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);
Thanks, Grim.