16.06.2018, 08:20
A note: when you send a threaded query (INSERT) and directly send another query which is based on the new row, it will not have effect.
pawn Код:
mysql_format(Database, DB_Query, sizeof(DB_Query),"INSERT INTO `RANKS` (`ID`) VALUES ('%d')",listitem+1);
mysql_tquery(Database, DB_Query, "OnRankInsert", "d", listitem+1);
pawn Код:
forward OnRankInsert(new_faction_rank);
public OnRankInsert(new_faction_rank)
{
// the new row was insert successful, you can execute other queries that use "WHERE ID=%d" here
}