16.09.2018, 10:53
So i am using SA-MP-MySQL R41-4, and when a player registers a new account, a query for adding a new row in the table of users is made by mysql_tquery function. Recently i added a system of inventory on my server, and now i need 2 queries for creating a row in the users table and in the inventories table to be executed at once, but it's impossible to do that in mysql_tquery function (i've tried separating them by ';', i get syntax errors in the mysql log). The only idea that i've got so far is to make "chain" of tquery'ies so that it first inserts a new row into talbe `users`, then in the callback of that tquery it inserts a new row into `inventories` table etc., but that's ultra ugly code, and there must be a much better way to solve my problem. So what can i do?