25.03.2014, 13:51
Quote:
How would I go about handling transactions? I have one instance where I need, or rather want to perform inserts in a loop. Do I simply execute Start->queries->Commit?
|
I haven't tested it myself but following should be theoretically possible.
pawn Код:
Transaction()
{
mysql_query(HWND, "START TRANSACTION;", false);
for(new i = 0; i < SOMETHING; ++i)
{
mysql_query(HWND, "SOME UPDATE QUERY", false);
}
mysql_query(HWND, "COMMIT;", false);
}